From 59af8e09868cdb678781fb93cbadf5ea90255a48 Mon Sep 17 00:00:00 2001 From: ARDiDo <90479315+ARDiDo@users.noreply.github.com> Date: Fri, 3 Dec 2021 16:16:59 -0500 Subject: [PATCH] OSD: fix segfault when no app_id is set --- src/osd.c | 3 +++ 1 file changed, 3 insertions(+) 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;