Bug 1131808 - Avoid trying to allocate a buffer for 0 sized YCbCr images. r=nical

This commit is contained in:
Matt Woodrow 2015-02-12 11:23:56 +13:00
parent ee13a97588
commit f208c78e8a

View File

@ -861,7 +861,7 @@ BufferTextureClient::AllocateForYCbCr(gfx::IntSize aYSize,
size_t bufSize = YCbCrImageDataSerializer::ComputeMinBufferSize(aYSize,
aCbCrSize);
if (!Allocate(bufSize)) {
if (!bufSize || !Allocate(bufSize)) {
return false;
}
YCbCrImageDataSerializer serializer(GetBuffer(), GetBufferSize());