Bug 1292628. Make sure our surface is good before locking it. r=mstange

This should fix a crash in ssse3_fetch_bilinear_cover.
This commit is contained in:
Jeff Muizelaar 2016-08-19 18:49:50 -04:00
parent a0ddf20ce7
commit 5df785429a

View File

@ -731,7 +731,8 @@ DrawTargetCairo::LockBits(uint8_t** aData, IntSize* aSize,
}
}
#endif
if (cairo_surface_get_type(surf) == CAIRO_SURFACE_TYPE_IMAGE) {
if (cairo_surface_get_type(surf) == CAIRO_SURFACE_TYPE_IMAGE &&
cairo_surface_status(surf) == CAIRO_STATUS_SUCCESS) {
PointDouble offset;
cairo_surface_get_device_offset(target, &offset.x, &offset.y);
// verify the device offset can be converted to integers suitable for a bounds rect