Null-check mRootContent before using it. b=303260 r+sr=bzbarsky

git-svn-id: svn://10.0.0.236/trunk@203075 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mats.palmgren%bredband.net
2006-07-19 03:53:12 +00:00
parent 92bbf2689c
commit eb497125b4

View File

@@ -5020,7 +5020,7 @@ nsDocument::OnPageShow(PRBool aPersisted)
mVisible = PR_TRUE;
UpdateLinkMap();
if (aPersisted) {
if (aPersisted && mRootContent) {
// Send out notifications that our <link> elements are attached.
nsRefPtr<nsContentList> links = NS_GetContentList(mRootContent,
nsHTMLAtoms::link,
@@ -5046,7 +5046,7 @@ nsDocument::OnPageHide(PRBool aPersisted)
{
// Send out notifications that our <link> elements are detached,
// but only if this is not a full unload.
if (aPersisted) {
if (aPersisted && mRootContent) {
nsRefPtr<nsContentList> links = NS_GetContentList(mRootContent,
nsHTMLAtoms::link,
kNameSpaceID_Unknown);