summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_services.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-05-23 20:25:54 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-05-23 20:25:54 +0000
commit8e146597bbd27b72a42a3a197c1db17153e2e0b3 (patch)
tree52d5d578e44a50ac37966e37241fbd7a12fc05b9 /protocols/Tox/src/tox_services.cpp
parentff0c96de9a298089aa7239ecae4c35b2368cb371 (diff)
Tox: options fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@13796 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_services.cpp')
-rw-r--r--protocols/Tox/src/tox_services.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/Tox/src/tox_services.cpp b/protocols/Tox/src/tox_services.cpp
index f42a3d35c0..c9fc238f34 100644
--- a/protocols/Tox/src/tox_services.cpp
+++ b/protocols/Tox/src/tox_services.cpp
@@ -5,12 +5,12 @@ INT_PTR CToxProto::SetMyNickname(WPARAM wParam, LPARAM lParam)
ptrT nickname((wParam & SMNN_UNICODE) ? mir_u2t((TCHAR*)lParam) : mir_a2t((char*)lParam));
setTString("Nick", nickname);
- T2Utf szNick8(nickname);
- TOX_ERR_SET_INFO error;
- if (!tox_self_set_name(tox, szNick8, mir_strlen(szNick8), &error))
+ if (IsOnline())
{
- debugLogA(__FUNCTION__": failed to set nick name");
- return 1;
+ T2Utf szNick8(nickname);
+ TOX_ERR_SET_INFO error;
+ if (!tox_self_set_name(tox, szNick8, mir_strlen(szNick8), &error))
+ debugLogA(__FUNCTION__": failed to set nick name");
}
return 0;