Commit 9f8ce618 authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

cairo scale: do not create surfaces with an invalid size

parent a9ce1e93
......@@ -528,6 +528,9 @@ _cairo_image_surface_scale (cairo_surface_t *image,
if ((src_width == scaled_width) && (src_height == scaled_height))
return _cairo_image_surface_copy (image);
if ((src_width <= 0) || (src_height <= 0))
return NULL;
scaled = _cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment