desktop-shell: fix invalid memory access when shell execution fails

In this case wl_client_add_destroy_listener() was called with a NULL
client, which is invalid.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
Arnaud Vrac 2014-08-25 20:56:46 +02:00 committed by Pekka Paalanen
parent 3c40f368eb
commit 4263119d02

View file

@ -5349,8 +5349,10 @@ launch_desktop_shell_process(void *data)
shell->client,
desktop_shell_sigchld);
if (!shell->child.client)
if (!shell->child.client) {
weston_log("not able to start %s\n", shell->client);
return;
}
shell->child.client_destroy_listener.notify =
desktop_shell_client_destroy;