Added check to see if DocLoader exists before dereferencing the pointer...

This commit is contained in:
rpotts%netscape.com 1998-08-01 06:45:43 +00:00
parent 1cdeba207d
commit 92f005308f
2 changed files with 8 additions and 4 deletions

View File

@ -263,8 +263,10 @@ nsWebShell::nsWebShell()
nsWebShell::~nsWebShell()
{
// Stop any pending document loads and destroy the loader...
if (nsnull != mDocLoader) {
mDocLoader->Stop();
NS_IF_RELEASE(mDocLoader);
NS_RELEASE(mDocLoader);
}
NS_IF_RELEASE(mInnerWindow);

View File

@ -263,8 +263,10 @@ nsWebShell::nsWebShell()
nsWebShell::~nsWebShell()
{
// Stop any pending document loads and destroy the loader...
if (nsnull != mDocLoader) {
mDocLoader->Stop();
NS_IF_RELEASE(mDocLoader);
NS_RELEASE(mDocLoader);
}
NS_IF_RELEASE(mInnerWindow);