From 6cdb165fa406d4bd0b275dc44efc731a8f8f6fc8 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 24 Jun 2019 10:53:31 +0100 Subject: [PATCH] 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) {