Commit 764ff272 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

Check to make sure PropSheetInfo* is not null before dereferencing it

for some windows messages.
parent f676cb52
...@@ -3413,6 +3413,9 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -3413,6 +3413,9 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, PropSheetInfoStr); PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, PropSheetInfoStr);
if (!psInfo)
return FALSE;
/* No default handler, forward notification to active page */ /* No default handler, forward notification to active page */
if (psInfo->activeValid && psInfo->active_page != -1) if (psInfo->activeValid && psInfo->active_page != -1)
{ {
...@@ -3448,6 +3451,9 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -3448,6 +3451,9 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
PropSheetInfoStr); PropSheetInfoStr);
HWND hwndPage = 0; HWND hwndPage = 0;
if (!psInfo)
return FALSE;
if (psInfo->activeValid && psInfo->active_page != -1) if (psInfo->activeValid && psInfo->active_page != -1)
hwndPage = psInfo->proppage[psInfo->active_page].hwndPage; hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
...@@ -3509,6 +3515,9 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -3509,6 +3515,9 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd,
PropSheetInfoStr); PropSheetInfoStr);
if (!psInfo)
return FALSE;
psInfo->restartWindows = TRUE; psInfo->restartWindows = TRUE;
return TRUE; return TRUE;
} }
...@@ -3518,6 +3527,9 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -3518,6 +3527,9 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd,
PropSheetInfoStr); PropSheetInfoStr);
if (!psInfo)
return FALSE;
psInfo->rebootSystem = TRUE; psInfo->rebootSystem = TRUE;
return TRUE; return TRUE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment