mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
Bug 664918. Part 6: ImageContainer::GetCurrentAsSurface shouldn't crash when mActiveImage is null. r=bas
This commit is contained in:
parent
587d304a70
commit
d1bcb5139c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user