aboutsummaryrefslogtreecommitdiff
path: root/fiv-io.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-07-09 04:39:09 +0200
committerPřemysl Eric Janouch <p@janouch.name>2023-07-09 04:39:35 +0200
commit9b99de99bbe2d87ee62bb72931a22f2551fa470e (patch)
treefbae96b6bb512b23e0c6fc19b404abdb35aa6a0c /fiv-io.c
parentab75d2b61d58bcfc9c8c22d53b0b4cf2658b17c3 (diff)
downloadfiv-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.c5
1 files 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;
}