From 9b99de99bbe2d87ee62bb72931a22f2551fa470e Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Sun, 9 Jul 2023 04:39:09 +0200 Subject: Fix crash in the librsvg loader --- fiv-io.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fiv-io.c b/fiv-io.c index 3c31a79..6bbb128 100644 --- a/fiv-io.c +++ b/fiv-io.c @@ -2417,10 +2417,11 @@ load_librsvg_render_internal(FivIoRenderClosureLibrsvg *self, double scale, cairo_surface_t *surface = fiv_io_image_to_surface_noref(image); cairo_t *cr = cairo_create(surface); cairo_surface_destroy(surface); - (void) rsvg_handle_render_document(self->handle, cr, &viewport, error); + gboolean success = + rsvg_handle_render_document(self->handle, cr, &viewport, error); cairo_status_t status = cairo_status(cr); cairo_destroy(cr); - if (error) { + if (!success) { fiv_io_image_unref(image); return NULL; } -- cgit v1.2.3-70-g09d2