mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1236266 - Don't generate invalid empty regions in pixman (r=jmuizelaar)
This commit is contained in:
parent
d72068aa11
commit
e5a4fce1c1
@ -1334,6 +1334,15 @@ PREFIX(_intersect_rect) (region_type_t *dest,
|
||||
region.extents.x2 = x + width;
|
||||
region.extents.y2 = y + height;
|
||||
|
||||
if (!GOOD_RECT (®ion.extents))
|
||||
{
|
||||
if (BAD_RECT (®ion.extents))
|
||||
_pixman_log_error (FUNC, "Invalid rectangle passed");
|
||||
FREE_DATA (dest);
|
||||
PREFIX (_init) (dest);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return PREFIX(_intersect) (dest, source, ®ion);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user