diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2023-07-09 04:39:09 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2023-07-09 04:39:35 +0200 |
commit | 9b99de99bbe2d87ee62bb72931a22f2551fa470e (patch) | |
tree | fbae96b6bb512b23e0c6fc19b404abdb35aa6a0c /fiv-io.c | |
parent | ab75d2b61d58bcfc9c8c22d53b0b4cf2658b17c3 (diff) | |
download | fiv-9b99de99bbe2d87ee62bb72931a22f2551fa470e.tar.gz fiv-9b99de99bbe2d87ee62bb72931a22f2551fa470e.tar.xz fiv-9b99de99bbe2d87ee62bb72931a22f2551fa470e.zip |
Fix crash in the librsvg loader
Diffstat (limited to 'fiv-io.c')
-rw-r--r-- | fiv-io.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; } |