summaryrefslogtreecommitdiff
path: root/plugins/AVS
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-09-28 19:57:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-09-28 19:57:38 +0000
commitd7d72c2eca857e23402e8e24b634c995b1794539 (patch)
tree77d0faf5ff8c2ba5a4d9cce6118184701bc68c44 /plugins/AVS
parent6c579fee385e85c9e62d818c0a019b30a57043c0 (diff)
crash fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@10619 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AVS')
-rw-r--r--plugins/AVS/src/services.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp
index 17bfc4b4ff..75f4b66d2c 100644
--- a/plugins/AVS/src/services.cpp
+++ b/plugins/AVS/src/services.cpp
@@ -288,7 +288,7 @@ static void FilterGetStrings(CMString &filter, BOOL xml, BOOL swf)
static UINT_PTR CALLBACK SetMyAvatarHookProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
OPENFILENAME *ofn = (OPENFILENAME *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
- SetMyAvatarHookData *data = (SetMyAvatarHookData *)ofn->lCustData;
+ SetMyAvatarHookData *data;
switch (msg) {
case WM_INITDIALOG:
@@ -311,6 +311,7 @@ static UINT_PTR CALLBACK SetMyAvatarHookProc(HWND hwnd, UINT msg, WPARAM wParam,
break;
case WM_NOTIFY:
+ data = (SetMyAvatarHookData *)ofn->lCustData;
if (data->thumbnail) {
HWND hwndParent = GetParent(hwnd);
HWND hwndLv = FindWindowEx(hwndParent, NULL, _T("SHELLDLL_DefView"), NULL);
@@ -322,6 +323,7 @@ static UINT_PTR CALLBACK SetMyAvatarHookProc(HWND hwnd, UINT msg, WPARAM wParam,
break;
case WM_DESTROY:
+ data = (SetMyAvatarHookData *)ofn->lCustData;
data->square = IsDlgButtonChecked(hwnd, IDC_MAKE_SQUARE);
data->grow = IsDlgButtonChecked(hwnd, IDC_GROW);