summaryrefslogtreecommitdiff
path: root/src/modules/clist/clistmenus.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-04 19:11:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-04 19:11:17 +0000
commitd7f143dba9e53347a1d7897bcd3989751c7f45f8 (patch)
treebb464bed05487cb48d2221dee5840d943fa0b8d1 /src/modules/clist/clistmenus.cpp
parent3f918fb53343d815ba8736735d1c0beea2359b15 (diff)
wiping objects during dynamic plugin unload
git-svn-id: http://svn.miranda-ng.org/main/trunk@762 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/clist/clistmenus.cpp')
-rw-r--r--src/modules/clist/clistmenus.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp
index dc9c4a69e2..677678d847 100644
--- a/src/modules/clist/clistmenus.cpp
+++ b/src/modules/clist/clistmenus.cpp
@@ -1193,7 +1193,7 @@ static INT_PTR AddStatusMenuItem(WPARAM wParam, LPARAM lParam)
mir_free(ptszName);
}
if (pRoot == NULL) {
- TMO_MenuItem tmi = { 0 };
+ memset(&tmi, 0, sizeof(tmi));
tmi.cbSize = sizeof(tmi);
tmi.flags = (mi->flags & CMIF_UNICODE) | CMIF_ROOTHANDLE;
tmi.position = 1001;
@@ -1233,12 +1233,9 @@ static INT_PTR AddStatusMenuItem(WPARAM wParam, LPARAM lParam)
smep->hMenuItem = menuHandle;
char buf[MAX_PATH+64];
-
- {
- char* p = (pRoot) ? mir_t2a(pRoot->mi.ptszName) : NULL;
- mir_snprintf(buf, SIZEOF(buf), "%s/%s", (p) ? p : "", mi->pszService ? mi->pszService : "");
- mir_free(p);
- }
+ char* p = (pRoot) ? mir_t2a(pRoot->mi.ptszName) : NULL;
+ mir_snprintf(buf, SIZEOF(buf), "%s/%s", (p) ? p : "", mi->pszService ? mi->pszService : "");
+ mir_free(p);
MO_SetOptionsMenuItem(menuHandle, OPT_MENUITEMSETUNIQNAME, (INT_PTR)buf);