summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_network.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_network.cpp')
-rw-r--r--protocols/Tox/src/tox_network.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/protocols/Tox/src/tox_network.cpp b/protocols/Tox/src/tox_network.cpp
index 53c83085c0..70ea5665c4 100644
--- a/protocols/Tox/src/tox_network.cpp
+++ b/protocols/Tox/src/tox_network.cpp
@@ -34,7 +34,10 @@ void CToxProto::BootstrapDht()
int port = db_get_w(NULL, "TOX", setting, 0);
mir_snprintf(setting, SIZEOF(setting), TOX_SETTINGS_NODE_PKEY, i + 1);
ptrA pubKey(db_get_sa(NULL, "TOX", setting));
- tox_bootstrap_from_address(tox, address, port, ToxBinAddress(pubKey));
+ if (pubKey && address)
+ {
+ tox_bootstrap_from_address(tox, address, port, ToxBinAddress(pubKey));
+ }
}
}
}