summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_address.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_address.h')
-rw-r--r--protocols/Tox/src/tox_address.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_address.h b/protocols/Tox/src/tox_address.h
index a4b152427d..d205eb731e 100644
--- a/protocols/Tox/src/tox_address.h
+++ b/protocols/Tox/src/tox_address.h
@@ -53,6 +53,11 @@ public:
}
ToxBinAddress(const char *hex)
{
+ if (hex == NULL) {
+ binData.resize(32);
+ return;
+ }
+
char *endptr;
const char *pos = hex;
int size = mir_strlen(hex) / 2;