[gtk/wip/otte/for-master: 2/7] stringfilter: Don't crash if the expression returns ""



commit b75db7d1c64914818f389347f76e1953192597b0
Author: Benjamin Otte <otte redhat com>
Date:   Sat Jun 27 06:29:58 2020 +0200

    stringfilter: Don't crash if the expression returns ""

 gtk/gtkstringfilter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkstringfilter.c b/gtk/gtkstringfilter.c
index ada86ea401..3fa924e9c3 100644
--- a/gtk/gtkstringfilter.c
+++ b/gtk/gtkstringfilter.c
@@ -110,9 +110,9 @@ gtk_string_filter_match (GtkFilter *filter,
       !gtk_expression_evaluate (self->expression, item, &value))
     return FALSE;
   s = g_value_get_string (&value);
-  if (s == NULL)
-    return FALSE;
   prepared = gtk_string_filter_prepare (self, s);
+  if (prepared == NULL)
+    return FALSE;
 
   switch (self->match_mode)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]