summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alan F <alan@eth0.org.uk>2017-07-14 21:44:03 +0100
committerGravatar Alan F <alan@eth0.org.uk>2017-07-14 21:44:03 +0100
commit42ecc9648e0b04976b8bb576699e1ecde6a72e01 (patch)
treec4e6d984ceba7453de8a8c70ca5cd70a61770427
parent20a1832618849df958ecf8e6392dd34af02dc850 (diff)
parenta502e7e30d7f178993a2cc7b19bcfd238162fe2a (diff)
Merge branch 'Elinvention-master'
-rw-r--r--src/trg-files-tree-view.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/trg-files-tree-view.c b/src/trg-files-tree-view.c
index 2b739c9..afe6073 100644
--- a/src/trg-files-tree-view.c
+++ b/src/trg-files-tree-view.c
@@ -186,8 +186,14 @@ search_func (GtkTreeModel *model, gint column,
gpointer search_data)
{
gchar *iter_string = NULL;
+ gchar *lowercase = NULL;
+ gboolean result = TRUE;
gtk_tree_model_get(model, iter, column, &iter_string, -1);
- gboolean result = g_strrstr(g_utf8_strdown(iter_string, -1), key) == NULL;
+ if (iter_string != NULL) {
+ lowercase = g_utf8_strdown(iter_string, -1);
+ result = g_strrstr(lowercase, key) == NULL;
+ }
+ g_free(lowercase);
g_free(iter_string);
return result;
}