static gboolean gdk_pixbuf_stop_load(gpointer data, GError **error) {
SvgTinyContext* context = (SvgTinyContext*)data;
GdkPixbuf* pixbuf = NULL;
- gboolean result = TRUE;
GError* sub_error = NULL;
+ g_assert(context != NULL);
+ if (context->svg_data == NULL || context->svg_data_size == 0) {
+ /* Is it possible to begin/stop with no increments in between?
+ * I sure don't know. Let's play it safe. */
+ return FALSE;
+ }
/* If we're inside of gtk-encode-symbolic-svg right now, we need to
process the insane librsvg-specific XInclude directive it hands
}
else {
g_propagate_error(error, sub_error);
- result = FALSE;
+ return FALSE;
}
g_free(context->svg_data);
g_free(context);
- return result;
+ return TRUE;
}