Bug 649417 - Check if BasicShadowableImageLayer has a current image before attempting to use it. r=cjones

This commit is contained in:
Matt Woodrow 2011-05-13 12:38:44 +12:00
parent 1cdda9e879
commit 1b63f405ae

View File

@ -2005,7 +2005,14 @@ private:
void
BasicShadowableImageLayer::Paint(gfxContext* aContext)
{
if (!mContainer) {
return;
}
nsRefPtr<Image> image = mContainer->GetCurrentImage();
if (!image) {
return;
}
if (image->GetFormat() == Image::PLANAR_YCBCR && BasicManager()->IsCompositingCheap()) {
PlanarYCbCrImage *YCbCrImage = static_cast<PlanarYCbCrImage*>(image.get());