summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-05-22 15:17:13 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-05-22 15:17:13 +0000
commit58d832660f070790f4e070de1a988b19b55310c0 (patch)
treeeb2fe2587a6bfcca6555ab9046d81146755ea3b9
parentac36d9d6b69ef3e7ca6e3a3fe327adc71e93d18f (diff)
fix for occasional crash in Popup skin options
git-svn-id: http://svn.miranda-ng.org/main/trunk@4801 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/Popup/src/opt_skins.cpp24
1 files changed, 13 insertions, 11 deletions
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);