summaryrefslogtreecommitdiff
path: root/src/eom-image.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-01-26 12:12:26 +0300
committermonsta <[email protected]>2017-01-26 12:12:26 +0300
commit3feec5633fff52463bfac2df678944a2775dce01 (patch)
tree55486ac6c6b90c55082ba6366077a6c7107f041f /src/eom-image.c
parent52e24934ab37f874df2511ed760b2e39b49b5048 (diff)
downloadeom-3feec5633fff52463bfac2df678944a2775dce01.tar.bz2
eom-3feec5633fff52463bfac2df678944a2775dce01.tar.xz
fix leak of GError when loading SVG fails
ported from: https://git.gnome.org/browse/eog/commit/?id=55036c6d55b06e82a480b559d59f5effae26399d
Diffstat (limited to 'src/eom-image.c')
-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
}