]> git.mdlowis.com Git - proto/labwc.git/commitdiff
ssd: fix crash on app_id updates while the app is in fullscreen
authortokyo4j <hrak1529@gmail.com>
Wed, 25 Sep 2024 12:27:43 +0000 (21:27 +0900)
committerHiroaki Yamamoto <hrak1529@gmail.com>
Wed, 25 Sep 2024 12:44:33 +0000 (21:44 +0900)
`view->ssd_enabled && view->ssd == NULL` is possible during the client is
in fullscreen. So we need to check if `view->ssd` is NULL first in
`ssd_update_window_icon()`.

src/ssd/ssd-titlebar.c

index 923ae91e1812a321b9a9de84ce24c669f3288daf..caa0a7595010399026b69c98b423a52fbb970403 100644 (file)
@@ -638,6 +638,10 @@ void
 ssd_update_window_icon(struct ssd *ssd)
 {
 #if HAVE_LIBSFDO
+       if (!ssd) {
+               return;
+       }
+
        const char *app_id = view_get_string_prop(ssd->view, "app_id");
        if (string_null_or_empty(app_id)) {
                return;