diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-03-12 09:03:04 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-03-12 09:03:04 +0000 |
commit | 256658520668e10007764fe9054e48b7a286c3fd (patch) | |
tree | b23ec9b4f2cc72a16b8cc5afb1a7fef2cf3b7650 /protocols/Tox | |
parent | 6dfb8adb67adb1c01105804e329fcd4a2b152c06 (diff) |
tox crash fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@12386 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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)
|