]> git.mdlowis.com Git - proto/labwc.git/commitdiff
OSD: fix segfault when no app_id is set
authorARDiDo <90479315+ARDiDo@users.noreply.github.com>
Fri, 3 Dec 2021 21:16:59 +0000 (16:16 -0500)
committerARDiDo <90479315+ARDiDo@users.noreply.github.com>
Fri, 3 Dec 2021 21:16:59 +0000 (16:16 -0500)
src/osd.c

index 8b3ea94c6d7929653c643cf5bc5168cf3e07106a..4b987ef2433ef7ff3b3f62024cad7ede4d989261 100644 (file)
--- a/src/osd.c
+++ b/src/osd.c
@@ -44,6 +44,9 @@ static const char *
 get_formatted_app_id(struct view *view)
 {
        char *s = (char *)view_get_string_prop(view, "app_id");
+       if (s == NULL) {
+               return NULL;
+       }
        /* remove the first two nodes of 'org.' strings */
        if (!strncmp(s, "org.", 4)) {
                char *p = s + 4;