summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk/gtktreeview.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index ce9b1b2b4..955d4eca4 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -14668,7 +14668,6 @@ gtk_tree_view_search_init (GtkWidget *entry,
GtkTreeView *tree_view)
{
gint ret;
- gint len;
gint count = 0;
const gchar *text;
GtkTreeIter iter;
@@ -14679,7 +14678,7 @@ gtk_tree_view_search_init (GtkWidget *entry,
g_return_if_fail (GTK_IS_TREE_VIEW (tree_view));
text = gtk_entry_get_text (GTK_ENTRY (entry));
- len = strlen (text);
+
model = gtk_tree_view_get_model (tree_view);
selection = gtk_tree_view_get_selection (tree_view);
@@ -14695,7 +14694,7 @@ gtk_tree_view_search_init (GtkWidget *entry,
tree_view);
}
- if (len < 1)
+ if (*text == '\0')
return;
if (!gtk_tree_model_get_iter_first (model, &iter))