Don't hold a pointer to a destroyed frame if we fail to load the placeholder

image.  Bug 292257, r=jst, sr=dbaron, a=chofmann


git-svn-id: svn://10.0.0.236/trunk@173102 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2005-05-06 03:14:31 +00:00
parent 0335c77171
commit 828adec252

View File

@@ -1670,7 +1670,6 @@ nsObjectFrame::CreateDefaultFrames(nsPresContext *aPresContext,
anchorFrame->AddStateBits(NS_BLOCK_SPACE_MGR | NS_BLOCK_MARGIN_ROOT);
nsHTMLContainerFrame::CreateViewForFrame(anchorFrame, this, PR_FALSE);
mFrames.AppendFrame(this, anchorFrame);
rv = NS_NewImageFrame(shell, &imgFrame);
if (NS_FAILED(rv))
@@ -1706,6 +1705,9 @@ nsObjectFrame::CreateDefaultFrames(nsPresContext *aPresContext,
if (textFrame)
textFrame->Destroy(aPresContext);
} else {
// Creation of all our anonymous content succeeded.
mFrames.AppendFrame(this, anchorFrame);
}
nsCOMPtr<nsISupportsArray> array;