Commit 01736b0b authored by Dom Lachowicz's avatar Dom Lachowicz

sanity checks for the gdkpixbuf backend

parent ffce7134
2004-09-26 Dom Lachowicz <cinamod@hotmail.com>
* gdk-pixbuf-loader/io-svg.c: Sanity checks
2004-09-25 Dom Lachowicz <cinamod@hotmail.com>
* rsvg.c Part of bug 153671
......
......@@ -133,12 +133,19 @@ gdk_pixbuf__svg_image_load_increment (gpointer data,
else
context->handle = rsvg_handle_new ();
if (!context->handle)
if (!context->handle) {
rsvg_propegate_error (error, _("Error displaying image"), ERROR_DISPLAYING_IMAGE);
return FALSE;
}
rsvg_handle_set_size_callback (context->handle, context->size_func, context->user_data, NULL);
}
if (!context->handle) {
rsvg_propegate_error (error, _("Error displaying image"), ERROR_DISPLAYING_IMAGE);
return FALSE;
}
if (!rsvg_handle_write (context->handle, buf, size, error)) {
rsvg_propegate_error (error, _("Error writing"), ERROR_WRITING);
return FALSE;
......@@ -161,6 +168,11 @@ gdk_pixbuf__svg_image_stop_load (gpointer data, GError **error)
if (error)
*error = NULL;
if (!context->handle) {
rsvg_propegate_error (error, _("Error displaying image"), ERROR_DISPLAYING_IMAGE);
return FALSE;
}
rsvg_handle_close (context->handle, error);
if (context->pixbuf == NULL)
......
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