g_clear_pointer(NULL, g_error_free)
The SVG loader produces a sigsegv error when a call to rsvg_handle_write() fails.
I found this upon upgrade to Beowulf, spacefm crashes reading an .svg file.
I fixed it like so:
--- librsvg2-common/librsvg-2.44.10/gdk-pixbuf-loader/io-svg.c.orig
+++ librsvg2-common/librsvg-2.44.10/gdk-pixbuf-loader/io-svg.c
@@ -131,7 +131,8 @@
}
if (!rsvg_handle_write (context->handle, buf, size, error)) {
- g_clear_pointer(error, g_error_free);
+ if (error)
+ g_clear_pointer(error, g_error_free);
rsvg_propagate_error (error, _("Error writing"), ERROR_WRITING);
return FALSE;
}