aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/ChangeLog6
-rw-r--r--e-util/e-gui-utils.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 94b3f4a095..b4b75c01fc 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,9 @@
+2004-02-25 Jeffrey Stedfast <fejj@ximian.com>
+
+ * e-gui-utils.c (e_icon_for_mime_type): Protect against feeding
+ gdk_pixbuf_new_from_file() a NULL path. Clears up some console
+ warning spewage.
+
2004-02-19 Not Zed <NotZed@Ximian.com>
* e-pilot-util.c: include string.h, fixes 64 bit crash. From
diff --git a/e-util/e-gui-utils.c b/e-util/e-gui-utils.c
index fc8e5921b2..9f80610063 100644
--- a/e-util/e-gui-utils.c
+++ b/e-util/e-gui-utils.c
@@ -163,7 +163,10 @@ e_icon_for_mime_type (const char *mime_type, int size_hint)
}
}
#endif
-
+
+ if (icon_path == NULL)
+ return NULL;
+
pixbuf = gdk_pixbuf_new_from_file (icon_path, NULL);
g_free (icon_path);
return pixbuf;