Bug 664918. Part 6: ImageContainer::GetCurrentAsSurface shouldn't crash when mActiveImage is null. r=bas

This commit is contained in:
Robert O'Callahan 2012-04-30 15:11:47 +12:00
parent b10f6b9538
commit 284af82b77

View File

@ -231,12 +231,15 @@ ImageContainer::GetCurrentAsSurface(gfxIntSize *aSize)
CrossProcessMutexAutoLock autoLock(*mRemoteDataMutex);
EnsureActiveImage();
if (!mActiveImage)
return nsnull;
*aSize = mRemoteData->mSize;
return mActiveImage ? mActiveImage->GetAsSurface() : nsnull;
} else {
if (!mActiveImage)
return nsnull;
*aSize = mActiveImage->GetSize();
}
*aSize = mActiveImage->GetSize();
return mActiveImage ? mActiveImage->GetAsSurface() : nsnull;
return mActiveImage->GetAsSurface();
}
gfxIntSize