[gimp/gimp-2-6] Bug 631728 - Crash or Gtk-CRITICAL on File->Open



commit 3436b76c8445c3a5e33b4098a6065e2a7b56c904
Author: Sven Neumann <sven gimp org>
Date:   Mon Oct 18 18:28:57 2010 +0200

    Bug 631728 - Crash or Gtk-CRITICAL on File->Open
    
    Check return value of gtk_icon_theme_lookup_by_gicon() before using it.
    (cherry picked from commit 1130e8c8908c7d011948bac9ae65c7f57b18e8dd)

 app/widgets/gimpviewrendererimagefile.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpviewrendererimagefile.c b/app/widgets/gimpviewrendererimagefile.c
index ca84911..26acb4b 100644
--- a/app/widgets/gimpviewrendererimagefile.c
+++ b/app/widgets/gimpviewrendererimagefile.c
@@ -184,12 +184,15 @@ gimp_view_renderer_imagefile_get_icon (GimpImagefile *imagefile,
               GtkIconInfo *info;
 
               info = gtk_icon_theme_lookup_by_gicon (icon_theme, icon, size, 0);
-              pixbuf = gtk_icon_info_load_icon (info, NULL);
+
+              if (info)
+                pixbuf = gtk_icon_info_load_icon (info, NULL);
             }
           else
             {
 #ifdef GIMP_UNSTABLE
-              g_printerr ("no icon for: %s\n", gimp_object_get_name (imagefile));
+              g_printerr ("no icon for: %s\n",
+                          gimp_object_get_name (imagefile));
 #endif
             }
 



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