From 7bc051c5495f7443220709149a999eeebb6640b1 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 25 Feb 2004 21:15:45 +0000 Subject: Protect against feeding gdk_pixbuf_new_from_file() a NULL path. Clears up 2004-02-25 Jeffrey Stedfast * 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. svn path=/trunk/; revision=24874 --- e-util/ChangeLog | 6 ++++++ e-util/e-gui-utils.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'e-util') 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 + + * 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 * 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; -- cgit v1.2.3