gimp r26277 - in trunk: . app/widgets
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26277 - in trunk: . app/widgets
- Date: Tue, 22 Jul 2008 14:50:37 +0000 (UTC)
Author: mitch
Date: Tue Jul 22 14:50:37 2008
New Revision: 26277
URL: http://svn.gnome.org/viewvc/gimp?rev=26277&view=rev
Log:
2008-07-22 Michael Natterer <mitch gimp org>
* app/widgets/gimpviewrendererimagefile.c
(gimp_view_renderer_imagefile_get_icon): guard against
g_file_query_info() returning NULL (if the file doesn't exist or
whatever error).
Modified:
trunk/ChangeLog
trunk/app/widgets/gimpviewrendererimagefile.c
Modified: trunk/app/widgets/gimpviewrendererimagefile.c
==============================================================================
--- trunk/app/widgets/gimpviewrendererimagefile.c (original)
+++ trunk/app/widgets/gimpviewrendererimagefile.c Tue Jul 22 14:50:37 2008
@@ -169,18 +169,24 @@
{
GFile *file;
GFileInfo *file_info;
- GIcon *icon;
GtkIconInfo *info;
file = g_file_new_for_uri (gimp_object_get_name (GIMP_OBJECT (imagefile)));
file_info = g_file_query_info (file, "standard::icon", 0, NULL, NULL);
- icon = g_file_info_get_icon (file_info);
- info = gtk_icon_theme_lookup_by_gicon (icon_theme, icon, size, 0);
- pixbuf = gtk_icon_info_load_icon (info, NULL);
+ if (file_info)
+ {
+ GIcon *icon;
+
+ icon = g_file_info_get_icon (file_info);
+
+ info = gtk_icon_theme_lookup_by_gicon (icon_theme, icon, size, 0);
+ pixbuf = gtk_icon_info_load_icon (info, NULL);
+
+ g_object_unref (file_info);
+ }
g_object_unref (file);
- g_object_unref (file_info);
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]