Fix a reentrancy issue in the property sheet implementation by not
caching a pointer that can change.
This commit is contained in:
parent
7dba7d3138
commit
c286ca06a0
@ -1381,7 +1381,6 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent,
|
|||||||
DLGTEMPLATE* pTemplate;
|
DLGTEMPLATE* pTemplate;
|
||||||
HWND hwndPage;
|
HWND hwndPage;
|
||||||
RECT rc;
|
RECT rc;
|
||||||
PropPageInfo* ppInfo = psInfo->proppage;
|
|
||||||
PADDING_INFO padding;
|
PADDING_INFO padding;
|
||||||
UINT pageWidth,pageHeight;
|
UINT pageWidth,pageHeight;
|
||||||
DWORD resSize;
|
DWORD resSize;
|
||||||
@ -1494,7 +1493,7 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent,
|
|||||||
if(temp)
|
if(temp)
|
||||||
Free(temp);
|
Free(temp);
|
||||||
|
|
||||||
ppInfo[index].hwndPage = hwndPage;
|
psInfo->proppage[index].hwndPage = hwndPage;
|
||||||
|
|
||||||
if (psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD) {
|
if (psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD) {
|
||||||
/* FIXME: This code may no longer be correct.
|
/* FIXME: This code may no longer be correct.
|
||||||
@ -2278,7 +2277,6 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg,
|
|||||||
if (!psInfo) {
|
if (!psInfo) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
oldPages = psInfo->proppage;
|
|
||||||
/*
|
/*
|
||||||
* hpage takes precedence over index.
|
* hpage takes precedence over index.
|
||||||
*/
|
*/
|
||||||
@ -2345,6 +2343,7 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg,
|
|||||||
/* Remove the tab */
|
/* Remove the tab */
|
||||||
SendMessageW(hwndTabControl, TCM_DELETEITEM, index, 0);
|
SendMessageW(hwndTabControl, TCM_DELETEITEM, index, 0);
|
||||||
|
|
||||||
|
oldPages = psInfo->proppage;
|
||||||
psInfo->nPages--;
|
psInfo->nPages--;
|
||||||
psInfo->proppage = Alloc(sizeof(PropPageInfo) * psInfo->nPages);
|
psInfo->proppage = Alloc(sizeof(PropPageInfo) * psInfo->nPages);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user