[gnome-desktop] thumbnail: Add debug when loading an image file fails



commit d0575a32c2f477c5f68fcaa22a5ace4f04b29fd3
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Sep 6 13:31:44 2017 +0200

    thumbnail: Add debug when loading an image file fails
    
    https://bugzilla.gnome.org/show_bug.cgi?id=787249

 libgnome-desktop/gnome-desktop-thumbnail.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c
index 5d55349..e56c3d7 100644
--- a/libgnome-desktop/gnome-desktop-thumbnail.c
+++ b/libgnome-desktop/gnome-desktop-thumbnail.c
@@ -1074,7 +1074,12 @@ gnome_desktop_thumbnail_factory_generate_thumbnail (GnomeDesktopThumbnailFactory
       data = gnome_desktop_thumbnail_script_exec (script, size, uri, &error);
       if (data)
         {
-          pixbuf = pixbuf_new_from_bytes (data, NULL);
+          pixbuf = pixbuf_new_from_bytes (data, &error);
+          if (!pixbuf)
+            {
+              g_debug ("Could not load thumbnail pixbuf: %s", error->message);
+              g_error_free (error);
+            }
           g_bytes_unref (data);
         }
       else


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