diff --git a/mozilla/netwerk/protocol/http/src/nsHTTPChannel.cpp b/mozilla/netwerk/protocol/http/src/nsHTTPChannel.cpp index 66fb2d557ad..207b5bba3de 100644 --- a/mozilla/netwerk/protocol/http/src/nsHTTPChannel.cpp +++ b/mozilla/netwerk/protocol/http/src/nsHTTPChannel.cpp @@ -1766,11 +1766,13 @@ nsresult nsHTTPChannel::Redirect(const char *aNewLocation, rv = channel->SetOriginalURI(mOriginalURI); if (NS_FAILED(rv)) return rv; - nsCOMPtr tempChannel; - rv = mLoadGroup->GetDefaultLoadChannel(getter_AddRefs(tempChannel)); - if (NS_SUCCEEDED(rv)) { - if (tempChannel == this) { - mLoadGroup->SetDefaultLoadChannel(channel); + if (mLoadGroup) { + nsCOMPtr tempChannel; + rv = mLoadGroup->GetDefaultLoadChannel(getter_AddRefs(tempChannel)); + if (NS_SUCCEEDED(rv)) { + if (tempChannel == this) { + mLoadGroup->SetDefaultLoadChannel(channel); + } } }