mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 00:32:11 +00:00
null-check mDocument in case firing onload causes it to go away (bug 298022). r=darin, a=asa.
This commit is contained in:
parent
98a9a84fcb
commit
d0503004d6
@ -1029,8 +1029,10 @@ DocumentViewerImpl::LoadComplete(nsresult aStatus)
|
||||
}
|
||||
|
||||
// Notify the document that it has been shown (regardless of whether
|
||||
// it was just loaded).
|
||||
mDocument->OnPageShow(restoring);
|
||||
// it was just loaded). Note: mDocument may be null now if the above
|
||||
// firing of onload caused the document to unload.
|
||||
if (mDocument)
|
||||
mDocument->OnPageShow(restoring);
|
||||
|
||||
// Now that the document has loaded, we can tell the presshell
|
||||
// to unsuppress painting.
|
||||
|
Loading…
Reference in New Issue
Block a user