From 58d832660f070790f4e070de1a988b19b55310c0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 22 May 2013 15:17:13 +0000 Subject: fix for occasional crash in Popup skin options git-svn-id: http://svn.miranda-ng.org/main/trunk@4801 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Popup/src/opt_skins.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'plugins') diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp index fc83e8d42b..c8ec3e2dde 100644 --- a/plugins/Popup/src/opt_skins.cpp +++ b/plugins/Popup/src/opt_skins.cpp @@ -199,18 +199,20 @@ int SkinOptionList_AddSkin(OPTTREE_OPTION* &options, int *OptionsCount, int pos return pos; } -int SkinOptionList_AddMain(OPTTREE_OPTION* &options, int *OptionsCount, int pos, DWORD *dwGlobalOptions) { - BOOL bCheck; - LPTSTR mainOption [] = { - LPGENT("Show clock"), - LPGENT("Drop shadow effect"), - LPGENT("Drop shadow effect")_T("/")LPGENT("non rectangular"), - LPGENT("Enable Aero Glass (Vista+)"), - LPGENT("Use Windows colours"), - LPGENT("Use advanced text render")}; +///////////////////////////////////////////////////////////////////////////////////////// +static LPTSTR mainOption [] = { + LPGENT("Show clock"), + LPGENT("Drop shadow effect"), + LPGENT("Drop shadow effect")_T("/")LPGENT("non rectangular"), + LPGENT("Enable Aero Glass (Vista+)"), + LPGENT("Use Windows colours"), + LPGENT("Use advanced text render")}; + +int SkinOptionList_AddMain(OPTTREE_OPTION* &options, int *OptionsCount, int pos, DWORD *dwGlobalOptions) +{ for (int i=0; i < SIZEOF(mainOption); i++) { - bCheck = 0; + BOOL bCheck = 0; switch (i) { case 0: *dwGlobalOptions |= PopupOptions.DisplayTime ? (1 << i) : 0; @@ -271,7 +273,7 @@ bool SkinOptionList_Update (OPTTREE_OPTION* &options, int *OptionsCount, HWND hw } //add "Global options" DWORD dwGlobalOptions = 0; - int pos = SkinOptionList_AddMain(options, OptionsCount, pos, &dwGlobalOptions); + int pos = SkinOptionList_AddMain(options, OptionsCount, 0, &dwGlobalOptions); //add "Skin options" DWORD dwSkinOptions = 0; pos = SkinOptionList_AddSkin(options, OptionsCount, pos, &dwSkinOptions); -- cgit v1.2.3