when killing a window, we now set the GWL_USERDATA to NULL. this will basically

kill the "parent" pointer.
This commit is contained in:
michaelp%netscape.com 1998-08-18 22:03:34 +00:00
Родитель 2eddbca39b
Коммит 7b21ea3e0f
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -1754,7 +1754,8 @@ void nsWindow::SubclassWindow(BOOL bState)
::SetWindowLong(mWnd, GWL_USERDATA, (LONG)this);
}
else {
(void) ::SetWindowLong(mWnd, GWL_WNDPROC, (LONG)mPrevWndProc);
::SetWindowLong(mWnd, GWL_WNDPROC, (LONG)mPrevWndProc);
::SetWindowLong(mWnd, GWL_USERDATA, (LONG)NULL);
mPrevWndProc = NULL;
}
}
@ -1768,7 +1769,7 @@ void nsWindow::SubclassWindow(BOOL bState)
void nsWindow::OnDestroy()
{
SubclassWindow(FALSE);
mWnd = 0;
mWnd = NULL;
// free GDI objects
if (mBrush) {