[Xfce4-commits] <thunar:master> Avoid segfault with null mime-type (bug #8390).

Nick Schermer noreply at xfce.org
Thu Oct 25 20:24:01 CEST 2012


Updating branch refs/heads/master
         to 4699dd387aede8a6d337809cf4edfcdb656844b3 (commit)
       from 2282701217df440de6df5fc15d4aefb57dfd1fdd (commit)

commit 4699dd387aede8a6d337809cf4edfcdb656844b3
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Oct 25 20:22:38 2012 +0200

    Avoid segfault with null mime-type (bug #8390).

 plugins/thunar-uca/thunar-uca-model.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/plugins/thunar-uca/thunar-uca-model.c b/plugins/thunar-uca/thunar-uca-model.c
index d084b28..21e46bb 100644
--- a/plugins/thunar-uca/thunar-uca-model.c
+++ b/plugins/thunar-uca/thunar-uca-model.c
@@ -978,6 +978,8 @@ thunar_uca_model_get_default (void)
 static inline ThunarUcaTypes
 types_from_mime_type (const gchar *mime_type)
 {
+  if (mime_type == NULL)
+    return 0;
   if (strcmp (mime_type, "inode/directory") == 0)
     return THUNAR_UCA_TYPE_DIRECTORIES;
   else if (strncmp (mime_type, "audio/", 6) == 0)


More information about the Xfce4-commits mailing list