diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-12-02 19:57:36 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-12-02 19:57:36 +0000 |
commit | 0b1fa236fd7f6be7f0639ee321e2246f8845877a (patch) | |
tree | 1e396d60d883394dd821dd545b1f57c23ab77403 | |
parent | b3f1be3b5662a08d32eec21d9d667b8b1fa050ce (diff) | |
download | gdk-pixbuf-0b1fa236fd7f6be7f0639ee321e2246f8845877a.tar.gz |
Don't crash if mime_type is NULL. (#322998, Sadrul Habib Chowdhury)
2005-12-02 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilesystemunix.c (get_icon_for_mime_type): Don't crash
if mime_type is NULL. (#322998, Sadrul Habib Chowdhury)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 5 | ||||
-rw-r--r-- | gtk/gtkfilesystemunix.c | 3 |
3 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2005-12-02 Matthias Clasen <mclasen@redhat.com> + + * gtk/gtkfilesystemunix.c (get_icon_for_mime_type): Don't crash + if mime_type is NULL. (#322998, Sadrul Habib Chowdhury) + 2005-12-02 Michael Natterer <mitch@imendio.com> * gtk/gtkmenu.c: applied modified patch from maemo-gtk which diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 09fc227b7..c9ae73261 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2005-12-02 Matthias Clasen <mclasen@redhat.com> + + * gtk/gtkfilesystemunix.c (get_icon_for_mime_type): Don't crash + if mime_type is NULL. (#322998, Sadrul Habib Chowdhury) + 2005-12-02 Michael Natterer <mitch@imendio.com> * gtk/gtkmenu.c: applied modified patch from maemo-gtk which diff --git a/gtk/gtkfilesystemunix.c b/gtk/gtkfilesystemunix.c index 9525efcb7..ccc541a3a 100644 --- a/gtk/gtkfilesystemunix.c +++ b/gtk/gtkfilesystemunix.c @@ -1284,6 +1284,9 @@ get_icon_for_mime_type (GtkWidget *widget, GString *icon_name; GdkPixbuf *pixbuf; + if (!mime_type) + return NULL; + separator = strchr (mime_type, '/'); if (!separator) return NULL; /* maybe we should return a GError with "invalid MIME-type" */ |