diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-02-15 16:21:39 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-02-15 16:21:39 +0000 |
commit | acf80f676b629849e5a920f1cd07df463e741d4b (patch) | |
tree | 2b278912901cf6a7006f0bc612193a9f7c41f5ae /protocols/Tox/src/api_connection.cpp | |
parent | e6fd14cf522fe0309a21aea84bfe2c9b9ee0eedb (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/api_connection.cpp')
-rw-r--r-- | protocols/Tox/src/api_connection.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/protocols/Tox/src/api_connection.cpp b/protocols/Tox/src/api_connection.cpp index 3b3ffb4143..6a854612fb 100644 --- a/protocols/Tox/src/api_connection.cpp +++ b/protocols/Tox/src/api_connection.cpp @@ -4,11 +4,15 @@ int tox_bootstrap_from_address(Tox *tox, const char *address, uint16_t port, const uint8_t *public_key)
{
+ if (public_key == NULL)
+ return 0;
return CreateFunction<int(*)(Tox*, const char*, uint16_t, const uint8_t*)>(__FUNCTION__)(tox, address, port, public_key);
}
int tox_add_tcp_relay(Tox *tox, const char *address, uint16_t port, const uint8_t *public_key)
{
+ if (public_key == NULL)
+ return 0;
return CreateFunction<int(*)(Tox*, const char*, uint16_t, const uint8_t*)>(__FUNCTION__)(tox, address, port, public_key);
}
|