AlphaMask: add missing error check.
It's possible to allocate the bitmap object, then fail allocating the bits. The WebKit testsuite is a way to trigger this, and it crashed app_server.
This commit is contained in:
parent
34b9ff37b4
commit
36764b4001
@ -178,6 +178,11 @@ AlphaMask::_RenderPicture() const
|
||||
if (bitmap == NULL)
|
||||
return NULL;
|
||||
|
||||
if (!bitmap->IsValid()) {
|
||||
delete bitmap;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Clear the bitmap with the transparent color
|
||||
memset(bitmap->Bits(), 0, bitmap->BitsLength());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user