Fix for 36084, r=alecf,a=alecf. Put guard code around code that dereferences a context,

it was null, causing asserts, and eventually, a crash. Bug was a smoketest blocker.
This commit is contained in:
syd%netscape.com 2000-04-18 05:38:05 +00:00
parent fb1a037854
commit 76a839c993
2 changed files with 8 additions and 4 deletions

View File

@ -8369,8 +8369,10 @@ DoDeletingFrameSubtree(nsIPresContext* aPresContext,
// Remove the mapping from the content object to its frame
nsCOMPtr<nsIContent> content;
aFrame->GetContent(getter_AddRefs(content));
aFrameManager->SetPrimaryFrameFor(content, nsnull);
aFrameManager->ClearAllUndisplayedContentIn(content);
if ( content ) {
aFrameManager->SetPrimaryFrameFor(content, nsnull);
aFrameManager->ClearAllUndisplayedContentIn(content);
}
// Walk aFrame's child frames
nsIAtom* childListName = nsnull;

View File

@ -8369,8 +8369,10 @@ DoDeletingFrameSubtree(nsIPresContext* aPresContext,
// Remove the mapping from the content object to its frame
nsCOMPtr<nsIContent> content;
aFrame->GetContent(getter_AddRefs(content));
aFrameManager->SetPrimaryFrameFor(content, nsnull);
aFrameManager->ClearAllUndisplayedContentIn(content);
if ( content ) {
aFrameManager->SetPrimaryFrameFor(content, nsnull);
aFrameManager->ClearAllUndisplayedContentIn(content);
}
// Walk aFrame's child frames
nsIAtom* childListName = nsnull;