From: ARDiDo <90479315+ARDiDo@users.noreply.github.com> Date: Fri, 3 Dec 2021 21:16:59 +0000 (-0500) Subject: OSD: fix segfault when no app_id is set X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=59af8e09868cdb678781fb93cbadf5ea90255a48;p=proto%2Flabwc.git OSD: fix segfault when no app_id is set --- diff --git a/src/osd.c b/src/osd.c index 8b3ea94c..4b987ef2 100644 --- 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;