[Xfce4-commits] <thunar:master> Don't abort on non-utf8 charaters.
Nick Schermer
noreply at xfce.org
Sat Oct 20 19:44:01 CEST 2012
Updating branch refs/heads/master
to 3c9a18f548679a251b944c7caca40410d92a1b12 (commit)
from c55f3dc995138ce78d33525db62adddb4a744d4d (commit)
commit 3c9a18f548679a251b944c7caca40410d92a1b12
Author: Nick Schermer <nick at xfce.org>
Date: Sat Oct 20 19:41:19 2012 +0200
Don't abort on non-utf8 charaters.
thunar/thunar-path-entry.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/thunar/thunar-path-entry.c b/thunar/thunar-path-entry.c
index b3c5559..0f628b4 100644
--- a/thunar/thunar-path-entry.c
+++ b/thunar/thunar-path-entry.c
@@ -915,10 +915,16 @@ thunar_path_entry_match_func (GtkEntryCompletion *completion,
/* determine the real file name for the iter */
gtk_tree_model_get (model, iter, THUNAR_COLUMN_FILE_NAME, &name, -1);
name_normalized = g_utf8_normalize (name, -1, G_NORMALIZE_ALL);
- g_free (name);
+ if (G_LIKELY (name_normalized != NULL))
+ g_free (name);
+ else
+ name_normalized = name;
/* check if we have a match here */
- matched = g_str_has_prefix (name_normalized, last_slash);
+ if (name_normalized != NULL)
+ matched = g_str_has_prefix (name_normalized, last_slash);
+ else
+ matched = FALSE;
/* cleanup */
g_free (name_normalized);
More information about the Xfce4-commits
mailing list