diff options
Diffstat (limited to 'protocols/Tox')
-rw-r--r-- | protocols/Tox/src/tox_core.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/protocols/Tox/src/tox_core.cpp b/protocols/Tox/src/tox_core.cpp index 337ac9b2f7..5e1eae29d1 100644 --- a/protocols/Tox/src/tox_core.cpp +++ b/protocols/Tox/src/tox_core.cpp @@ -115,12 +115,15 @@ void CToxProto::UninitToxCore() transfers.Remove(transfer);
}
- ptrA nickname(mir_utf8encodeW(ptrT(getTStringA("Nick"))));
- tox_set_name(tox, (uint8_t*)(char*)nickname, mir_strlen(nickname));
+ if (IsToxCoreInited())
+ {
+ ptrA nickname(mir_utf8encodeW(ptrT(getTStringA("Nick"))));
+ tox_set_name(tox, (uint8_t*)(char*)nickname, mir_strlen(nickname));
- //temporary
- ptrA statusmes(mir_utf8encodeW(ptrT(getTStringA("StatusMsg"))));
- tox_set_status_message(tox, (uint8_t*)(char*)statusmes, mir_strlen(statusmes));
+ //temporary
+ ptrA statusmes(mir_utf8encodeW(ptrT(getTStringA("StatusMsg"))));
+ tox_set_status_message(tox, (uint8_t*)(char*)statusmes, mir_strlen(statusmes));
+ }
SaveToxProfile();
if (password != NULL)
|