summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-01-26 12:12:26 +0300
committermonsta <[email protected]>2017-01-26 15:06:24 +0300
commit68d7e5655ae43494cd615bb68e6dd62c21d3fd66 (patch)
tree0f7758004b4483c786bc041a5ce47022108f3ba0
parentf163b43728be648b7a91057ffb25b1b8505da36a (diff)
downloadeom-68d7e5655ae43494cd615bb68e6dd62c21d3fd66.tar.bz2
eom-68d7e5655ae43494cd615bb68e6dd62c21d3fd66.tar.xz
fix leak of GError when loading SVG fails
ported from: https://git.gnome.org/browse/eog/commit/?id=55036c6d55b06e82a480b559d59f5effae26399d
-rw-r--r--src/eom-image.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/eom-image.c b/src/eom-image.c
index 45e03c8..963f142 100644
--- a/src/eom-image.c
+++ b/src/eom-image.c
@@ -1050,7 +1050,10 @@ eom_image_real_load (EomImage *img,
}
#ifdef HAVE_RSVG
if (eom_image_is_svg (img))
- rsvg_handle_close (priv->svg, error);
+ /* Ignore the error if loading failed earlier
+ * as the error will already be set in that case */
+ rsvg_handle_close (priv->svg,
+ (failed ? NULL : error));
#endif
}