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
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);
}