mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1131808 - Avoid trying to allocate a buffer for 0 sized YCbCr images. r=nical
This commit is contained in:
parent
ee13a97588
commit
f208c78e8a
@ -861,7 +861,7 @@ BufferTextureClient::AllocateForYCbCr(gfx::IntSize aYSize,
|
|||||||
|
|
||||||
size_t bufSize = YCbCrImageDataSerializer::ComputeMinBufferSize(aYSize,
|
size_t bufSize = YCbCrImageDataSerializer::ComputeMinBufferSize(aYSize,
|
||||||
aCbCrSize);
|
aCbCrSize);
|
||||||
if (!Allocate(bufSize)) {
|
if (!bufSize || !Allocate(bufSize)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
YCbCrImageDataSerializer serializer(GetBuffer(), GetBufferSize());
|
YCbCrImageDataSerializer serializer(GetBuffer(), GetBufferSize());
|
||||||
|
Loading…
Reference in New Issue
Block a user