summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-09-21 19:44:52 +0300
committerMarius Vlad <marius.vlad@collabora.com>2022-09-22 14:01:36 +0300
commitd08a5b2010f6e6feb1642ebf8e8444c4091d70dc (patch)
treeaafaf1aa1e3b0d39ab21c029020e18d19f9e8e6b
parent0512e7251611e7040c550bb4c6cc972d57b45144 (diff)
desktop: Do not attempt to send terminate event
For cases where the shell client itself is stopped/terminated or the compositor is taken down, and implicitly with it, the shell client we won't really have a reasource available. Use the shell_ready flag to verify that. Fixes: 0512e7251611e7040c55 Bug-AGL: SPEC-4528 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I78b4fb39a76402535e642dda9cf284b57856376d
-rw-r--r--src/desktop.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/desktop.c b/src/desktop.c
index f28d0c9..0e71de9 100644
--- a/src/desktop.c
+++ b/src/desktop.c
@@ -370,7 +370,9 @@ skip_output_asignment:
shell_advertise_app_state(output->ivi, app_id,
NULL, AGL_SHELL_DESKTOP_APP_STATE_DESTROYED);
- if (wl_resource_get_version(output->ivi->shell_client.resource) >= AGL_SHELL_APP_STATE_SINCE_VERSION)
+ if (output->ivi->shell_client.ready &&
+ wl_resource_get_version(output->ivi->shell_client.resource)
+ >= AGL_SHELL_APP_STATE_SINCE_VERSION)
agl_shell_send_app_state(output->ivi->shell_client.resource,
app_id, AGL_SHELL_APP_STATE_TERMINATED);
}