[Xfce4-commits] <thunar:master> Handle the very unlikely null case in file_name too.
Nick Schermer
noreply at xfce.org
Tue Oct 2 17:08:01 CEST 2012
Updating branch refs/heads/master
to 1a7f8e3c7f7b1874192fb6161de7b9e30727bc26 (commit)
from d552e492add0bb6e4e7b56e275a1f7c8653d0e37 (commit)
commit 1a7f8e3c7f7b1874192fb6161de7b9e30727bc26
Author: Nick Schermer <nick at xfce.org>
Date: Tue Oct 2 17:05:58 2012 +0200
Handle the very unlikely null case in file_name too.
This can technically never happen, but better prepare for it.
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 08b8ca1..c2e4f34 100644
--- a/thunar/thunar-list-model.c
+++ b/thunar/thunar-list-model.c
@@ -1418,6 +1418,11 @@ sort_by_file_name (const ThunarFile *a,
const gchar *a_name = thunar_file_get_display_name (a);
const gchar *b_name = thunar_file_get_display_name (b);
+ if (a_name == NULL)
+ a_name = "";
+ if (b_name == NULL)
+ b_name = "";
+
if (!case_sensitive)
return strcasecmp (a_name, b_name);
else
More information about the Xfce4-commits
mailing list