Fix StealFrame failure + crash, b=400223 r+sr=roc a=roc

This commit is contained in:
fantasai.cvs@inkedblade.net 2007-10-19 07:54:07 -07:00
parent 95c1b1c8ad
commit 344d6b32b9

View File

@ -5221,7 +5221,8 @@ nsBlockFrame::DoRemoveFrame(nsIFrame* aDeletedFrame, PRBool aDestroyFrames,
if (aDestroyFrames) {
nsIFrame* nif = aDeletedFrame->GetNextInFlow();
if (nif)
nsContainerFrame::DeleteNextInFlowChild(presContext, nif);
static_cast<nsContainerFrame*>(nif->GetParent())
->nsContainerFrame::DeleteNextInFlowChild(presContext, nif);
nsresult rv = nsContainerFrame::StealFrame(presContext, aDeletedFrame);
NS_ENSURE_SUCCESS(rv, rv);
aDeletedFrame->Destroy();