Null-check document pointer. (Bug 516307) r=bzbarsky

This commit is contained in:
Bobby Holley 2009-09-16 12:01:18 -07:00
parent 2b3aa05445
commit b2aea95670

View File

@ -290,7 +290,8 @@ nsImageLoadingContent::OnStopDecode(imgIRequest* aRequest,
// decoding, so we can't wait for them to finish. See bug 512435.
// We can only do this if we have a presshell
nsIPresShell* shell = GetOurDocument()->GetPrimaryShell();
nsIDocument* doc = GetOurDocument();
nsIPresShell* shell = doc ? doc->GetPrimaryShell() : nsnull;
if (shell) {
// We need to figure out whether to kick off decoding