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

for some windows messages.
This commit is contained in:
Aric Stewart 2004-10-04 20:39:55 +00:00 committed by Alexandre Julliard
parent f676cb521d
commit 764ff272d6
1 changed files with 12 additions and 0 deletions

View File

@ -3413,6 +3413,9 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, PropSheetInfoStr);
if (!psInfo)
return FALSE;
/* No default handler, forward notification to active page */
if (psInfo->activeValid && psInfo->active_page != -1)
{
@ -3448,6 +3451,9 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
PropSheetInfoStr);
HWND hwndPage = 0;
if (!psInfo)
return FALSE;
if (psInfo->activeValid && psInfo->active_page != -1)
hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
@ -3509,6 +3515,9 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd,
PropSheetInfoStr);
if (!psInfo)
return FALSE;
psInfo->restartWindows = TRUE;
return TRUE;
}
@ -3518,6 +3527,9 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd,
PropSheetInfoStr);
if (!psInfo)
return FALSE;
psInfo->rebootSystem = TRUE;
return TRUE;
}