diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-07 20:20:17 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-07 20:20:17 +0000 |
commit | ba275795eba1936a3c395527cc55936a4dc02f9d (patch) | |
tree | 549685873bcc8e4e4447d8efa9c74ecab6af97ba /plugins/Clist_modern/src/modern_clisttray.cpp | |
parent | 284caa432d31130a2714ce6acb49826d55b8789d (diff) |
memory leak in Clist modern
git-svn-id: http://svn.miranda-ng.org/main/trunk@14060 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clisttray.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_clisttray.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index cd3f19d1c6..d24302d8e8 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -636,14 +636,15 @@ int cliTrayCalcChanged(const char *szChangedProto, int, int) break;
}
- DestroyIcon(pcli->trayIcon[i].hBaseIcon);
- pcli->trayIcon[i].hBaseIcon = hIcon;
- pcli->trayIcon[i].ptszToolTip = mir_tstrdup(pcli->szTip);
+ trayIconInfo_t &p = pcli->trayIcon[i];
+ DestroyIcon(p.hBaseIcon);
+ p.hBaseIcon = hIcon;
+ replaceStrT(p.ptszToolTip, pcli->szTip);
NOTIFYICONDATA nid = { sizeof(NOTIFYICONDATA) };
nid.hWnd = pcli->hwndContactList;
- nid.uID = pcli->trayIcon[i].id;
- nid.hIcon = pcli->trayIcon[i].hBaseIcon;
+ nid.uID = p.id;
+ nid.hIcon = p.hBaseIcon;
nid.uFlags = NIF_ICON | NIF_TIP;
// if Tipper is missing or turned off for tray, use system tooltips
|