bug 13630, r=troy, a=leaf, Added a null check to prevent a crash.

git-svn-id: svn://10.0.0.236/trunk@48955 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
nisheeth%netscape.com
1999-09-24 01:58:32 +00:00
parent 2b566763b1
commit 5ad59bd30b
2 changed files with 4 additions and 4 deletions

View File

@@ -1725,9 +1725,9 @@ PresShell::ContentAppended(nsIDocument *aDocument,
// If history state has been set by session history, ask the frame manager
// to restore frame state for the frame hierarchy created for the chunk of
// content that just came in.
nsIFrame* frame = nsnull;
nsIFrame* frame;
rv = GetPrimaryFrameFor(aContainer, &frame);
if (NS_SUCCEEDED(rv))
if (NS_SUCCEEDED(rv) && nsnull != frame)
mFrameManager->RestoreFrameState(frame, mHistoryState);
}

View File

@@ -1725,9 +1725,9 @@ PresShell::ContentAppended(nsIDocument *aDocument,
// If history state has been set by session history, ask the frame manager
// to restore frame state for the frame hierarchy created for the chunk of
// content that just came in.
nsIFrame* frame = nsnull;
nsIFrame* frame;
rv = GetPrimaryFrameFor(aContainer, &frame);
if (NS_SUCCEEDED(rv))
if (NS_SUCCEEDED(rv) && nsnull != frame)
mFrameManager->RestoreFrameState(frame, mHistoryState);
}