#8325 "[PP]Exiting Profile Manager and crash". r=sfraser, a=chofmann.

This commit is contained in:
pierre%netscape.com 1999-06-19 02:33:23 +00:00
parent ef85fb6fbd
commit 2809961b0f

View File

@ -85,6 +85,24 @@ nsWindow::nsWindow() : nsBaseWidget() , nsDeleteObserved(this)
//-------------------------------------------------------------------------
nsWindow::~nsWindow()
{
// notify the children that we're gone
nsCOMPtr<nsIEnumerator> children ( getter_AddRefs(GetChildren()) );
if (children)
{
children->First();
do
{
nsISupports* child;
if (NS_SUCCEEDED(children->CurrentItem(&child)))
{
nsWindow* childWindow = static_cast<nsWindow*>(child);
NS_RELEASE(child);
childWindow->mParent = nsnull;
}
} while (NS_SUCCEEDED(children->Next()));
}
mDestructorCalled = PR_TRUE;
//Destroy();