From 452fb59c22573ddf7939bea02b5e58f4f2e3916c Mon Sep 17 00:00:00 2001 From: Szymon Tokarz Date: Fri, 10 Jan 2014 23:24:27 +0000 Subject: Clist_modern - Do not execute ModernSkinButtonUnloadModule function twice - Do not manually free smartpointer git-svn-id: http://svn.miranda-ng.org/main/trunk@7585 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_skinbutton.cpp | 2 -- plugins/Clist_modern/src/modern_viewmodebar.cpp | 7 ++----- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'plugins/Clist_modern') diff --git a/plugins/Clist_modern/src/modern_skinbutton.cpp b/plugins/Clist_modern/src/modern_skinbutton.cpp index 57fe0f2293..b65782bc56 100644 --- a/plugins/Clist_modern/src/modern_skinbutton.cpp +++ b/plugins/Clist_modern/src/modern_skinbutton.cpp @@ -33,7 +33,6 @@ This file contains code related to new modern free positioned skinned buttons #define MODERNSKINBUTTONCLASS "MirandaModernSkinButtonClass" BOOL ModernSkinButtonModuleIsLoaded = FALSE; -static HANDLE hookSystemShutdown_ModernSkinButton = NULL; static LRESULT CALLBACK ModernSkinButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); int ModernSkinButtonUnloadModule(WPARAM wParam, LPARAM lParam); int SkinSelector_DeleteMask(MODERNMASK *mm); @@ -83,7 +82,6 @@ int ModernSkinButtonLoadModule() wc.style = CS_GLOBALCLASS; RegisterClassEx(&wc); InitializeCriticalSection(&csTips); - hookSystemShutdown_ModernSkinButton = HookEvent(ME_SYSTEM_SHUTDOWN, ModernSkinButtonUnloadModule); ModernSkinButtonModuleIsLoaded = TRUE; return 0; } diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index fdd9b79130..e4432a5eed 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -443,11 +443,11 @@ void SaveState() if (iLen) { unsigned int stickies = 0; - TCHAR *szTempModeName = ( TCHAR* )mir_alloc((iLen + 1)*sizeof(TCHAR)); + TCHAR *szTempModeName = (TCHAR*)mir_alloc((iLen + 1)*sizeof(TCHAR)); if (szTempModeName) { SendDlgItemMessage(clvmHwnd, IDC_VIEWMODES, LB_GETTEXT, clvm_curItem, (LPARAM)szTempModeName); - ptrA szModeName( mir_utf8encodeT(szTempModeName)); + ptrA szModeName(mir_utf8encodeT(szTempModeName)); DWORD dwGlobalMask = GetMaskForItem(hInfoItem); for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { @@ -484,11 +484,8 @@ void SaveState() SaveViewMode(szModeName, newGroupFilter, newProtoFilter, statusMask, dwGlobalMask, options, stickies, operators, lmdat); - if (szModeName && szModeName != (char*)szTempModeName) - mir_free(szModeName); mir_free(szTempModeName); szTempModeName = NULL; - szModeName = NULL; } } EnableWindow(GetDlgItem(clvmHwnd, IDC_APPLY), FALSE); -- cgit v1.2.3