summaryrefslogtreecommitdiff
path: root/protocols/Tox
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox')
-rw-r--r--protocols/Tox/src/tox_search.cpp2
-rw-r--r--protocols/Tox/src/tox_services.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/protocols/Tox/src/tox_search.cpp b/protocols/Tox/src/tox_search.cpp
index 8ec4a35250..910b5497a9 100644
--- a/protocols/Tox/src/tox_search.cpp
+++ b/protocols/Tox/src/tox_search.cpp
@@ -12,7 +12,7 @@ ToxHexAddress ResolveToxAddressFromDnsRecordV1(const std::string &dnsRecord)
return ToxHexAddress::Empty();
}
-ToxHexAddress ResolveToxAddressFromDnsRecordV2(const std::string &dnsRecord)
+ToxHexAddress ResolveToxAddressFromDnsRecordV2(const std::string &/*dnsRecord*/)
{
// unsupported
/*std::smatch match;
diff --git a/protocols/Tox/src/tox_services.cpp b/protocols/Tox/src/tox_services.cpp
index f970e5499a..136c7baa5b 100644
--- a/protocols/Tox/src/tox_services.cpp
+++ b/protocols/Tox/src/tox_services.cpp
@@ -5,6 +5,9 @@ INT_PTR __cdecl CToxProto::SetMyNickname(WPARAM wParam, LPARAM lParam)
ptrT nickname((wParam & SMNN_UNICODE) ? mir_u2t((TCHAR*)lParam) : mir_a2t((char*)lParam));
setTString("Nick", nickname);
- tox_set_name(tox, (uint8_t*)(char*)ptrA(mir_utf8encodeT(nickname)), mir_tstrlen(nickname));
+ if (IsToxCoreInited())
+ {
+ tox_set_name(tox, (uint8_t*)(char*)ptrA(mir_utf8encodeT(nickname)), mir_tstrlen(nickname));
+ }
return 0;
}