]> git.mdlowis.com Git - proto/labwc.git/commitdiff
osd: fix crash when props are NULL
authorbi4k8 <bi4k8@github>
Thu, 16 Dec 2021 16:24:13 +0000 (16:24 +0000)
committerARDiDo <90479315+ARDiDo@users.noreply.github.com>
Fri, 17 Dec 2021 01:42:07 +0000 (20:42 -0500)
this happened while running Xwayland *over* waypipe, so is likely not a common case, but is possible

src/osd.c

index e2b7d8082ffa897ff74c9e1d029ac3eddaf840bc..07ff5ada6cb3124813e5ce30badee454b3d7590c 100644 (file)
--- 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
        }