[gtk/issue-1973] Do not add empty strings to GtkFileFilter



commit 6cdb165fa406d4bd0b275dc44efc731a8f8f6fc8
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Jun 24 10:53:31 2019 +0100

    Do not add empty strings to GtkFileFilter
    
    When parsing a UI description for GtkFileFilter we should avoid passing
    empty strings, to avoid issues when serialising the filter before
    sending it over DBus.
    
    Fixes: #1973

 gtk/gtkfilefilter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkfilefilter.c b/gtk/gtkfilefilter.c
index cd19fb688c..84a3613bc2 100644
--- a/gtk/gtkfilefilter.c
+++ b/gtk/gtkfilefilter.c
@@ -299,7 +299,7 @@ parser_end_element (GMarkupParseContext *context,
 {
   SubParserData *data = (SubParserData*)user_data;
 
-  if (data->string)
+  if (data->string != NULL && data->string->len != 0)
     {
       switch (data->type)
         {


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