summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_menus.cpp
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-01-17 21:35:32 +0300
committeraunsane <aunsane@gmail.com>2018-01-17 21:35:54 +0300
commit8e7d34b4716392f9d9a338e755027cff0a8f3161 (patch)
tree4415fd81d4389f1a2a5ea2dc0c6b25727f82fdd7 /protocols/Tox/src/tox_menus.cpp
parent51d67b220e416aabac680c66e1be306f140221f2 (diff)
Tox: fixed crash on password deletion #1101
Diffstat (limited to 'protocols/Tox/src/tox_menus.cpp')
-rw-r--r--protocols/Tox/src/tox_menus.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/Tox/src/tox_menus.cpp b/protocols/Tox/src/tox_menus.cpp
index 34b3047fb4..88d7129713 100644
--- a/protocols/Tox/src/tox_menus.cpp
+++ b/protocols/Tox/src/tox_menus.cpp
@@ -58,7 +58,7 @@ void CToxProto::InitContactMenu()
CreateServiceFunction(mi.pszService, GlobalService<&CToxProto::OnGrantAuth>);
}
-int CToxProto::PrebuildStatusMenu(WPARAM, LPARAM)
+int CToxProto::UpdateStatusMenu(WPARAM, LPARAM)
{
bool isOnline = IsOnline();
Menu_EnableItem(StatusMenuItems[SMI_PASSWORD], isOnline);
@@ -77,7 +77,7 @@ int CToxProto::PrebuildStatusMenu(WPARAM, LPARAM)
int CToxProto::OnInitStatusMenu()
{
- HookProtoEvent(ME_CLIST_PREBUILDSTATUSMENU, &CToxProto::PrebuildStatusMenu);
+ //HookProtoEvent(ME_CLIST_PREBUILDSTATUSMENU, &CToxProto::UpdateStatusMenu);
CMenuItem mi;
mi.flags = CMIF_UNICODE;
@@ -117,5 +117,7 @@ int CToxProto::OnInitStatusMenu()
mi.position = SMI_PASSWORD_REMOVE;
StatusMenuItems[SMI_PASSWORD_REMOVE] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
+ UpdateStatusMenu(NULL, NULL);
+
return 0;
}