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



commit 1130e8c8908c7d011948bac9ae65c7f57b18e8dd
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.

 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 c2bdb6a..a2cabf1 100644
--- a/app/widgets/gimpviewrendererimagefile.c
+++ b/app/widgets/gimpviewrendererimagefile.c
@@ -180,12 +180,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]