summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_network.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-02-15 16:21:39 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-02-15 16:21:39 +0000
commitacf80f676b629849e5a920f1cd07df463e741d4b (patch)
tree2b278912901cf6a7006f0bc612193a9f7c41f5ae /protocols/Tox/src/tox_network.cpp
parente6fd14cf522fe0309a21aea84bfe2c9b9ee0eedb (diff)
Tox: check public key on null
git-svn-id: http://svn.miranda-ng.org/main/trunk@12128 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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));
+ }
}
}
}