summaryrefslogtreecommitdiff
path: root/plugins/ModernOpt
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-12-28 17:01:29 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-12-28 17:01:29 +0000
commit1a2b947a3c806327a485fbf4c11099b32e8f314e (patch)
treeb616dc6b11db6bb7ad0adf1ddc7c2c48e9260cbf /plugins/ModernOpt
parent12d56e14046d4ea6fd9d4edd3e2e32e051f145ad (diff)
crash fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@15958 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ModernOpt')
-rw-r--r--plugins/ModernOpt/src/mopt_selector.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/ModernOpt/src/mopt_selector.cpp b/plugins/ModernOpt/src/mopt_selector.cpp
index 8298ad3291..e478011dd9 100644
--- a/plugins/ModernOpt/src/mopt_selector.cpp
+++ b/plugins/ModernOpt/src/mopt_selector.cpp
@@ -219,16 +219,15 @@ static void CreatePreview(TSelectorData *sd, TCHAR *fn, LPDRAWITEMSTRUCT lps)
INT_PTR CALLBACK ModernOptSelector_DlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
TSelectorData *sd = (TSelectorData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- MODERNOPTOBJECT *obj = sd->obj;
switch (msg) {
case WM_INITDIALOG:
sd = new TSelectorData;
- sd->obj = obj = (MODERNOPTOBJECT*)lParam;
- sd->active = sttGetActiveSkin(obj);
+ sd->obj = (MODERNOPTOBJECT*)lParam;
+ sd->active = sttGetActiveSkin(sd->obj);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)sd);
- BuildSkinList(GetDlgItem(hwndDlg, IDC_SKINLIST), _A2T(obj->lpzThemeExtension));
+ BuildSkinList(GetDlgItem(hwndDlg, IDC_SKINLIST), _A2T(sd->obj->lpzThemeExtension));
return FALSE;
case WM_COMMAND:
@@ -244,9 +243,9 @@ INT_PTR CALLBACK ModernOptSelector_DlgProc(HWND hwndDlg, UINT msg, WPARAM wPara
int idx = SendDlgItemMessage(hwndDlg, IDC_SKINLIST, LB_GETCURSEL, 0, 0);
if (idx >= 0) {
TSkinListItem *dat = (TSkinListItem *)SendDlgItemMessage(hwndDlg, IDC_SKINLIST, LB_GETITEMDATA, idx, 0);
- sttApplySkin(obj, dat->filename);
+ sttApplySkin(sd->obj, dat->filename);
mir_free(sd->active);
- sd->active = sttGetActiveSkin(obj);
+ sd->active = sttGetActiveSkin(sd->obj);
RedrawWindow(GetDlgItem(hwndDlg, IDC_SKINLIST), NULL, NULL, RDW_INVALIDATE);
}
break;