osd: fix crash when props are NULL

this happened while running Xwayland *over* waypipe, so is likely not a common case, but is possible
This commit is contained in:
bi4k8 2021-12-16 16:24:13 +00:00 committed by ARDiDo
parent fd7f06a375
commit 4ce96f75dc

View file

@ -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
}