From: Cristy Date: Thu, 23 Nov 2017 22:20:32 +0000 (-0500) Subject: https://github.com/ImageMagick/ImageMagick/issues/875 X-Git-Tag: 7.0.7-12~38 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=535d6eda03f3362a8e58b60db36d6fa7b9fbcccc;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/875 --- diff --git a/coders/svg.c b/coders/svg.c index 3190b5cd5..69faeaaa7 100644 --- a/coders/svg.c +++ b/coders/svg.c @@ -3081,7 +3081,7 @@ static Image *ReadSVGImage(const ImageInfo *image_info,ExceptionInfo *exception) cairo_surface=cairo_image_surface_create_for_data(pixels, CAIRO_FORMAT_ARGB32,(int) image->columns,(int) image->rows,(int) stride); - if (cairo_surface == (cairo_surface_t *) NULL) + if (cairo_surface_status() != CAIRO_STATUS_SUCCESS) { pixel_info=RelinquishVirtualMemory(pixel_info); g_object_unref(svg_handle);