Fixup deletion order to delete children before the parent when closing a window

This commit is contained in:
kipp%netscape.com 1999-04-03 18:45:31 +00:00
parent 088dde4ed7
commit c1c5634399

View File

@ -1542,18 +1542,18 @@ nsBrowserWindow::Close()
NS_RELEASE(mWebShell);
}
// NS_IF_RELEASE(mWindow);
if (nsnull != mWindow) {
nsIWidget* w = mWindow;
NS_RELEASE(w);
}
NS_IF_RELEASE(mBack);
NS_IF_RELEASE(mForward);
NS_IF_RELEASE(mLocation);
NS_IF_RELEASE(mThrobber);
NS_IF_RELEASE(mStatus);
// NS_IF_RELEASE(mWindow);
if (nsnull != mWindow) {
nsIWidget* w = mWindow;
NS_RELEASE(w);
}
return NS_OK;
}