From 7b21ea3e0fce99636e1eaa48e7b5dd8757facb58 Mon Sep 17 00:00:00 2001 From: "michaelp%netscape.com" Date: Tue, 18 Aug 1998 22:03:34 +0000 Subject: [PATCH] when killing a window, we now set the GWL_USERDATA to NULL. this will basically kill the "parent" pointer. --- widget/src/windows/nsWindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/widget/src/windows/nsWindow.cpp b/widget/src/windows/nsWindow.cpp index 53b4a47dd91..18c6ddd0055 100644 --- a/widget/src/windows/nsWindow.cpp +++ b/widget/src/windows/nsWindow.cpp @@ -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) {