Fix a reentrancy issue in the property sheet implementation by not

caching a pointer that can change.
This commit is contained in:
Matt Chapman 2004-02-25 01:24:22 +00:00 committed by Alexandre Julliard
parent 7dba7d3138
commit c286ca06a0
1 changed files with 2 additions and 3 deletions

View File

@ -1381,7 +1381,6 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent,
DLGTEMPLATE* pTemplate;
HWND hwndPage;
RECT rc;
PropPageInfo* ppInfo = psInfo->proppage;
PADDING_INFO padding;
UINT pageWidth,pageHeight;
DWORD resSize;
@ -1494,7 +1493,7 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent,
if(temp)
Free(temp);
ppInfo[index].hwndPage = hwndPage;
psInfo->proppage[index].hwndPage = hwndPage;
if (psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD) {
/* FIXME: This code may no longer be correct.
@ -2278,7 +2277,6 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg,
if (!psInfo) {
return FALSE;
}
oldPages = psInfo->proppage;
/*
* hpage takes precedence over index.
*/
@ -2345,6 +2343,7 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg,
/* Remove the tab */
SendMessageW(hwndTabControl, TCM_DELETEITEM, index, 0);
oldPages = psInfo->proppage;
psInfo->nPages--;
psInfo->proppage = Alloc(sizeof(PropPageInfo) * psInfo->nPages);