1 diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
2 index b0a2a2b9..a889afdb 100644
3 --- a/ivi-shell/ivi-shell.c
4 +++ b/ivi-shell/ivi-shell.c
5 @@ -664,10 +664,14 @@ wet_shell_init(struct weston_compositor *compositor,
6 if (!shell->text_backend)
9 + shell->desktop = weston_desktop_create(compositor, &shell_desktop_api, shell);
10 + if (!shell->desktop)
11 + goto err_text_backend;
13 if (wl_global_create(compositor->wl_display,
14 &ivi_application_interface, 1,
15 shell, bind_ivi_application) == NULL)
16 - goto err_text_backend;
19 ivi_layout_init_with_compositor(compositor);
20 /* TODO ivi_layout_destroy should be implemented, since multiple lists
21 @@ -676,6 +680,9 @@ wet_shell_init(struct weston_compositor *compositor,
26 + weston_desktop_destroy(shell->desktop);
29 text_backend_destroy(shell->text_backend);