From 7ec9441d255b4361be26705c65eed5819cd0208f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 23 Mar 2018 13:30:42 +0300 Subject: Clist_GroupCreate() to be called inside OnModulesLoaded, not inside the protocol's constructor --- protocols/Tox/src/tox_accounts.cpp | 2 ++ protocols/Tox/src/tox_proto.cpp | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'protocols/Tox/src') diff --git a/protocols/Tox/src/tox_accounts.cpp b/protocols/Tox/src/tox_accounts.cpp index ad948974a8..d70d6bad54 100644 --- a/protocols/Tox/src/tox_accounts.cpp +++ b/protocols/Tox/src/tox_accounts.cpp @@ -32,6 +32,8 @@ CToxProto* CToxProto::GetContactAccount(MCONTACT hContact) int CToxProto::OnAccountLoaded(WPARAM, LPARAM) { + Clist_GroupCreate(0, m_defaultGroup); + HookProtoEvent(ME_OPT_INITIALISE, &CToxProto::OnOptionsInit); HookProtoEvent(ME_USERINFO_INITIALISE, &CToxProto::OnUserInfoInit); HookProtoEvent(ME_MSG_PRECREATEEVENT, &CToxProto::OnPreCreateMessage); diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index 4b0a8581a2..0de30278a4 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -12,8 +12,7 @@ CToxProto::CToxProto(const char* protoName, const wchar_t* userName) m_defaultGroup = getWStringA(TOX_SETTINGS_GROUP); if (m_defaultGroup == nullptr) m_defaultGroup = mir_wstrdup(L"Tox"); - Clist_GroupCreate(0, m_defaultGroup); - + CreateProtoService(PS_CREATEACCMGRUI, &CToxProto::OnAccountManagerInit); setAllContactStatuses(ID_STATUS_OFFLINE); -- cgit v1.2.3