[Xfce4-commits] <thunar:master> Handle null content-types when sorting (bug #8465).

Nick Schermer noreply at xfce.org
Tue Oct 2 17:06:01 CEST 2012


Updating branch refs/heads/master
         to d552e492add0bb6e4e7b56e275a1f7c8653d0e37 (commit)
       from 06ec609814e5bf8a8cc7df9e33e76b51e329bece (commit)

commit d552e492add0bb6e4e7b56e275a1f7c8653d0e37
Author: Nick Schermer <nick at xfce.org>
Date:   Tue Oct 2 17:02:40 2012 +0200

    Handle null content-types when sorting (bug #8465).

 thunar/thunar-list-model.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/thunar/thunar-list-model.c b/thunar/thunar-list-model.c
index db22f82..08b8ca1 100644
--- a/thunar/thunar-list-model.c
+++ b/thunar/thunar-list-model.c
@@ -1492,6 +1492,11 @@ sort_by_mime_type (const ThunarFile *a,
   content_type_a = thunar_file_get_content_type (a);
   content_type_b = thunar_file_get_content_type (b);
 
+  if (content_type_a == NULL)
+    content_type_a = "";
+  if (content_type_b == NULL)
+    content_type_b = "";
+
   result = strcasecmp (content_type_a, content_type_b);
 
   if (result == 0)


More information about the Xfce4-commits mailing list