From d7d72c2eca857e23402e8e24b634c995b1794539 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 28 Sep 2014 19:57:38 +0000 Subject: crash fix git-svn-id: http://svn.miranda-ng.org/main/trunk@10619 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AVS/src/services.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/AVS/src/services.cpp') 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); -- cgit v1.2.3