From 96f90c1b44d38194db1dea712ea6ef6bb520020d Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Mon, 5 Dec 2005 02:13:17 +0000 Subject: [PATCH] Fix crash bug 319049. Patch by Christian Biesinger (:bi) , r+sr=bzbarsky git-svn-id: svn://10.0.0.236/trunk@185677 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsObjectLoadingContent.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mozilla/content/base/src/nsObjectLoadingContent.cpp b/mozilla/content/base/src/nsObjectLoadingContent.cpp index 7eccec1352b..0580dd2610f 100644 --- a/mozilla/content/base/src/nsObjectLoadingContent.cpp +++ b/mozilla/content/base/src/nsObjectLoadingContent.cpp @@ -548,6 +548,11 @@ nsObjectLoadingContent::EnsureInstantiation(nsIPluginInstance** aInstance) NS_ASSERTION(thisContent, "must be a content"); nsIDocument* doc = thisContent->GetCurrentDoc(); + if (!doc) { + // Nothing we can do while plugin loading is done in layout... + return NS_OK; + } + PRUint32 numShells = doc->GetNumberOfShells(); for (PRUint32 i = 0; i < numShells; ++i) { nsIPresShell* shell = doc->GetShellAt(i); @@ -740,8 +745,8 @@ nsObjectLoadingContent::ObjectURIChanged(nsIURI* aURI, AutoNotifier notifier(this, aNotify); - // AutoSetInstantiatingToFalse is instantiated after AutoNotifier, so that if the - // AutoNotifier triggers frame construction, events can be posted as + // AutoSetInstantiatingToFalse is instantiated after AutoNotifier, so that if + // the AutoNotifier triggers frame construction, events can be posted as // appropriate. NS_ASSERTION(!mInstantiating, "ObjectURIChanged was reentered?"); mInstantiating = PR_TRUE;