Fix for bug 23781.

git-svn-id: svn://10.0.0.236/trunk@57721 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
nisheeth%netscape.com 2000-01-13 23:32:47 +00:00
parent bcc30b68dd
commit 1a9c3b3033
2 changed files with 8 additions and 8 deletions

View File

@ -173,14 +173,13 @@ nsImageFrame::UpdateImage(nsIPresContext* aPresContext, PRUint32 aStatus)
ListTag(stdout);
printf(": UpdateImage: status=%x\n", aStatus);
#endif
nsIPresShell* presShell;
aPresContext->GetShell(&presShell);
nsCOMPtr<nsIPresShell> presShell;
aPresContext->GetShell(getter_AddRefs(presShell));
if (NS_IMAGE_LOAD_STATUS_ERROR & aStatus) {
// We failed to load the image. Notify the pres shell
if (presShell) {
presShell->CantRenderReplacedElement(aPresContext, this);
NS_RELEASE(presShell);
presShell->CantRenderReplacedElement(aPresContext, this);
}
}
else if (NS_IMAGE_LOAD_STATUS_SIZE_AVAILABLE & aStatus) {
@ -192,6 +191,7 @@ nsImageFrame::UpdateImage(nsIPresContext* aPresContext, PRUint32 aStatus)
NS_ASSERTION(0, "No parent to pass the reflow request up to.");
}
}
return NS_OK;
}

View File

@ -173,14 +173,13 @@ nsImageFrame::UpdateImage(nsIPresContext* aPresContext, PRUint32 aStatus)
ListTag(stdout);
printf(": UpdateImage: status=%x\n", aStatus);
#endif
nsIPresShell* presShell;
aPresContext->GetShell(&presShell);
nsCOMPtr<nsIPresShell> presShell;
aPresContext->GetShell(getter_AddRefs(presShell));
if (NS_IMAGE_LOAD_STATUS_ERROR & aStatus) {
// We failed to load the image. Notify the pres shell
if (presShell) {
presShell->CantRenderReplacedElement(aPresContext, this);
NS_RELEASE(presShell);
presShell->CantRenderReplacedElement(aPresContext, this);
}
}
else if (NS_IMAGE_LOAD_STATUS_SIZE_AVAILABLE & aStatus) {
@ -192,6 +191,7 @@ nsImageFrame::UpdateImage(nsIPresContext* aPresContext, PRUint32 aStatus)
NS_ASSERTION(0, "No parent to pass the reflow request up to.");
}
}
return NS_OK;
}