From 7600c51612f2d6d07c4502daef5f933eca2fa233 Mon Sep 17 00:00:00 2001 From: "Olli.Pettay%helsinki.fi" Date: Wed, 28 Jun 2006 07:40:13 +0000 Subject: [PATCH] Bug 342710, WARNING: NS_ENSURE_TRUE(shell) failed: file nsImageLoadingContent.cpp, line 842, r+sr=bz git-svn-id: svn://10.0.0.236/trunk@201086 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsImageLoadingContent.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mozilla/content/base/src/nsImageLoadingContent.cpp b/mozilla/content/base/src/nsImageLoadingContent.cpp index ffd83a2be61..47595a45e9b 100644 --- a/mozilla/content/base/src/nsImageLoadingContent.cpp +++ b/mozilla/content/base/src/nsImageLoadingContent.cpp @@ -839,10 +839,7 @@ nsImageLoadingContent::FireEvent(const nsAString& aEventType) NS_ASSERTION(NS_IsMainThread(), "should be on the main thread"); nsIPresShell *shell = document->GetShellAt(0); - NS_ENSURE_TRUE(shell, NS_ERROR_FAILURE); - - nsPresContext *presContext = shell->GetPresContext(); - NS_ENSURE_TRUE(presContext, NS_ERROR_FAILURE); + nsPresContext *presContext = shell ? shell->GetPresContext() : nsnull; nsCOMPtr evt = new nsImageLoadingContent::Event(presContext, this, aEventType, document);