Set private data struct to NULL to expose problems in other code

better. Fixes the XUnmapWindow problems reported by replacing them
with NULL ptr dereferences.
This commit is contained in:
Marcus Meissner 1999-01-23 14:03:11 +00:00 committed by Alexandre Julliard
parent fa5fe42952
commit 308477b6df
1 changed files with 5 additions and 0 deletions

View File

@ -100,6 +100,10 @@ void X11DRV_WND_Finalize(WND *wndPtr)
X11DRV_WND_DATA *pWndDriverData =
(X11DRV_WND_DATA *) wndPtr->pDriverData;
if (!wndPtr->pDriverData) {
ERR(win,"Trying to destroy window again. Not good.\n");
return;
}
if(pWndDriverData->window)
{
ERR(win,
@ -108,6 +112,7 @@ void X11DRV_WND_Finalize(WND *wndPtr)
pWndDriverData->window
);
}
wndPtr->pDriverData = NULL;
HeapFree(SystemHeap, 0, wndPtr->pDriverData);
}