From: bi4k8 Date: Thu, 16 Dec 2021 16:24:13 +0000 (+0000) Subject: osd: fix crash when props are NULL X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=4ce96f75dc4e3bd08812581b8713b72eaf213089;p=proto%2Flabwc.git osd: fix crash when props are NULL this happened while running Xwayland *over* waypipe, so is likely not a common case, but is possible --- 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 }