From 4ce96f75dc4e3bd08812581b8713b72eaf213089 Mon Sep 17 00:00:00 2001 From: bi4k8 Date: Thu, 16 Dec 2021 16:24:13 +0000 Subject: [PATCH] osd: fix crash when props are NULL this happened while running Xwayland *over* waypipe, so is likely not a common case, but is possible --- src/osd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osd.c b/src/osd.c index e2b7d808..07ff5ada 100644 --- a/src/osd.c +++ b/src/osd.c @@ -29,11 +29,11 @@ is_title_different(struct view *view) { switch (view->type) { case LAB_XDG_SHELL_VIEW: - return strcmp(view_get_string_prop(view, "title"), + return g_strcmp0(view_get_string_prop(view, "title"), view_get_string_prop(view, "app_id")); #if HAVE_XWAYLAND case LAB_XWAYLAND_VIEW: - return strcmp(view_get_string_prop(view, "title"), + return g_strcmp0(view_get_string_prop(view, "title"), view->xwayland_surface->class); #endif }