Bug 758533: Check that nsImageRenderer has an image when getting the container r=gal

This commit is contained in:
David Zbarsky 2012-06-10 17:31:42 -07:00
parent 308dfbb850
commit 0a3a5fbf6a

View File

@ -4091,6 +4091,8 @@ nsImageRenderer::IsRasterImage()
already_AddRefed<mozilla::layers::ImageContainer>
nsImageRenderer::GetContainer()
{
if (mType != eStyleImageType_Image)
return nsnull;
nsCOMPtr<imgIContainer> img;
nsresult rv = mImage->GetImageData()->GetImage(getter_AddRefs(img));
if (NS_FAILED(rv) || !img)