(#349): Don't panic when loading an external image that is bigger than Cairo's limits

We were failing to return a GError, and the Rust code panicked in
from_glib_full(error), as error = NULL then.

#349
parent 5af45efd
......@@ -1764,6 +1764,10 @@ rsvg_cairo_surface_new_from_href (RsvgHandle *handle,
}
surface = rsvg_cairo_surface_from_pixbuf (pixbuf);
if (!surface) {
g_set_error (error, RSVG_ERROR, RSVG_ERROR_FAILED, "could not convert pixbuf to cairo surface");
goto out;
}
if (mime_type == NULL) {
/* Try to get the information from the loader */
......
<image xlink:href="data:image/jpeg;base64,/9j00f/bAIQA0000000000000000000000000000000000000000000000000000000000000000000000000000000000000AE0000000000000000000000000000000000000000000000000000000000000000000000000000000000000/8AAEQgA0+00AwEiAAIRAQ0RAf/aAAwDAQACEQ0R0000"
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