]> git.mdlowis.com Git - proto/labwc.git/commitdiff
query: fix crash on missing identifier/title
authorTobias Bengfort <tobias.bengfort@posteo.de>
Sat, 20 Apr 2024 07:27:42 +0000 (09:27 +0200)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sat, 18 May 2024 19:04:08 +0000 (20:04 +0100)
src/view.c

index 74f5faf698f6616a6e8b8c89b012c91c85b6df8d..ee76a746f458efcf14f3c9f289c01852024a46db 100644 (file)
@@ -71,13 +71,13 @@ view_matches_query(struct view *view, struct view_query *query)
        const char *identifier = view_get_string_prop(view, "app_id");
        if (match && query->identifier) {
                empty = false;
-               match &= match_glob(query->identifier, identifier);
+               match &= identifier && match_glob(query->identifier, identifier);
        }
 
        const char *title = view_get_string_prop(view, "title");
        if (match && query->title) {
                empty = false;
-               match &= match_glob(query->title, title);
+               match &= title && match_glob(query->title, title);
        }
 
        if (match && query->window_type >= 0) {