Commit 6966c65b authored by Ulrich Czekalla's avatar Ulrich Czekalla Committed by Alexandre Julliard

PropertySheet didn't destroy page dialog's window while removing page.

parent 50f8e4b1
......@@ -1550,13 +1550,14 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg,
if (hpage != 0)
{
index = PROPSHEET_GetPageIndex(hpage, psInfo);
}
if (index == -1)
/* Make shure that index is within range */
if (index < 0 || index >= psInfo->nPages)
{
TRACE("Could not find page to remove!\n");
return FALSE;
}
}
TRACE("total pages %d removing page %d active page %d\n",
psInfo->nPages, index, psInfo->active_page);
......@@ -1594,6 +1595,12 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg,
if (index < psInfo->active_page)
psInfo->active_page--;
/* Destroy page dialog window.
* If it's last page in modal dialog, it has been destroyed by EndDialog
*/
if (psInfo->isModeless || psInfo->nPages > 1)
DestroyWindow(psInfo->proppage[index].hwndPage);
/* Remove the tab */
SendMessageA(hwndTabControl, TCM_DELETEITEM, index, 0);
......
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