_clip_and_composite_trapezoids: Avoid NULL pointer dereference due to OOM.

This closes bug #6197:

	Null pointer dereference on OOM in _clip_and_composite_trapezoids()
	https://bugs.freedesktop.org/show_bug.cgi?id=6197
(cherry picked from 6f0d8eedc5 commit)
This commit is contained in:
Carl Worth 2006-03-13 12:30:00 -08:00
parent 5e399f8778
commit 440bb68ef2

View file

@ -1439,6 +1439,9 @@ _cairo_surface_clip_and_composite_trapezoids (cairo_pattern_t *src,
return status;
clear_region = _cairo_region_create_from_rectangle (&extents);
if (clear_region == NULL)
return CAIRO_STATUS_NO_MEMORY;
status = _cairo_clip_intersect_to_region (clip, clear_region);
if (status)
return status;