mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
bug 13630, r=troy, a=leaf, Added a null check to prevent a crash.
This commit is contained in:
parent
5a207c767a
commit
19143aa5fe
@ -1725,9 +1725,9 @@ PresShell::ContentAppended(nsIDocument *aDocument,
|
|||||||
// If history state has been set by session history, ask the frame manager
|
// 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
|
// to restore frame state for the frame hierarchy created for the chunk of
|
||||||
// content that just came in.
|
// content that just came in.
|
||||||
nsIFrame* frame = nsnull;
|
nsIFrame* frame;
|
||||||
rv = GetPrimaryFrameFor(aContainer, &frame);
|
rv = GetPrimaryFrameFor(aContainer, &frame);
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv) && nsnull != frame)
|
||||||
mFrameManager->RestoreFrameState(frame, mHistoryState);
|
mFrameManager->RestoreFrameState(frame, mHistoryState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1725,9 +1725,9 @@ PresShell::ContentAppended(nsIDocument *aDocument,
|
|||||||
// If history state has been set by session history, ask the frame manager
|
// 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
|
// to restore frame state for the frame hierarchy created for the chunk of
|
||||||
// content that just came in.
|
// content that just came in.
|
||||||
nsIFrame* frame = nsnull;
|
nsIFrame* frame;
|
||||||
rv = GetPrimaryFrameFor(aContainer, &frame);
|
rv = GetPrimaryFrameFor(aContainer, &frame);
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv) && nsnull != frame)
|
||||||
mFrameManager->RestoreFrameState(frame, mHistoryState);
|
mFrameManager->RestoreFrameState(frame, mHistoryState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user