From 827b7e6f6686aa9206cf142c6aff4df74fe48ad8 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 7 Sep 2008 05:19:29 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20517233=20=E2=80=93=20Calling=20gdk=5Fpixb?= =?UTF-8?q?uf=5Floader=5Fclose=20causes=20"GError=20set=20over=20the?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2008-09-06 Matthias Clasen Bug 517233 – Calling gdk_pixbuf_loader_close causes "GError set over the top of a previous GError" warning * gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Don't overwrite errors. Reported by Andrey Tsyvarev svn path=/trunk/; revision=21309 --- gdk-pixbuf/ChangeLog | 8 ++++++++ gdk-pixbuf/gdk-pixbuf-loader.c | 8 ++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index eb46945d44..9d5f62a152 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,11 @@ +2008-09-06 Matthias Clasen + + Bug 517233 – Calling gdk_pixbuf_loader_close causes "GError set over + the top of a previous GError" warning + + * gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Don't overwrite + errors. Reported by Andrey Tsyvarev + 2008-09-05 Sebastien Bacher * gdk-pixbuf-io.c: (gdk_pixbuf_load_module_unlocked): diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c index ce6dc411d7..9ec8125997 100644 --- a/gdk-pixbuf/gdk-pixbuf-loader.c +++ b/gdk-pixbuf/gdk-pixbuf-loader.c @@ -726,8 +726,12 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader, * here, since we might not get an error in the * gdk_pixbuf_get_file_info() case */ - if (tmp) - g_propagate_error (error, tmp); + if (tmp) { + if (error && *error == NULL) + g_propagate_error (error, tmp); + else + g_error_free (tmp); + } retval = FALSE; } }