diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 1cac8656a7b..3ebdac45389 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -4114,7 +4114,6 @@ nsDocShell::InternalLoad(nsIURI * aURI, PRUint32 aLoadType, nsISHEntry * aSHEntry) { - nsresult rv; nsCOMPtr owner(aOwner); @@ -4263,8 +4262,13 @@ nsDocShell::InternalLoad(nsIURI * aURI, return rv; } - - + // + // Load is being targetted at this docshell so return an error if the + // docshell is in the process of being destroyed. + // + if (mIsBeingDestroyed) { + return NS_ERROR_FAILURE; + } mURIResultedInDocument = PR_FALSE; // reset the clock... mLSHE = aSHEntry;