From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Wed, 2 Mar 2011 14:21:55 -0500
Subject: Bug 634986. Don't act like we're redirecting if we don't have a
 channel. r=jst, a=blocker

---
 content/base/src/nsObjectLoadingContent.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/content/base/src/nsObjectLoadingContent.cpp b/content/base/src/nsObjectLoadingContent.cpp
index d5a3336..1c85a51 100644
--- a/content/base/src/nsObjectLoadingContent.cpp
+++ b/content/base/src/nsObjectLoadingContent.cpp
@@ -904,8 +904,9 @@ nsObjectLoadingContent::OnChannelRedirect(nsIChannel *aOldChannel,
                                           nsIChannel *aNewChannel,
                                           PRUint32    aFlags)
 {
-  // If we're already busy with a new load, cancel the redirect
-  if (aOldChannel != mChannel) {
+  // If we're already busy with a new load, or have no load at all,
+  // cancel the redirect.
+  if (!mChannel || aOldChannel != mChannel) {
     return NS_BINDING_ABORTED;
   }
 
