[goffice] GOPixbuf: avoid critical.



commit 25501d12bfae667da0283e91b39bb68173a308a7
Author: Morten Welinder <terra gnome org>
Date:   Sun Mar 1 11:57:30 2015 -0500

    GOPixbuf: avoid critical.

 ChangeLog                 |    5 +++++
 goffice/utils/go-pixbuf.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ddeb493..6d00b06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-01  Morten Welinder  <terra gnome org>
+
+       * goffice/utils/go-pixbuf.c (go_pixbuf_create_pixbuf): Avoid
+       critical when loading fails.
+
 2015-02-28  Morten Welinder  <terra gnome org>
 
        * goffice/utils/go-image.c (go_image_get_info): New function.
diff --git a/goffice/utils/go-pixbuf.c b/goffice/utils/go-pixbuf.c
index a1416c2..e3f0229 100644
--- a/goffice/utils/go-pixbuf.c
+++ b/goffice/utils/go-pixbuf.c
@@ -122,7 +122,7 @@ go_pixbuf_create_pixbuf (GOPixbuf *pixbuf, GError **error)
                        g_object_set (pixbuf,
                                      "pixbuf", gdk_pixbuf_loader_get_pixbuf (loader),
                                      NULL);
-               gdk_pixbuf_loader_close (loader, error);
+               gdk_pixbuf_loader_close (loader, error && !*error ? error : NULL);
                g_object_unref (loader);
        }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]