diff options
author | Stefan Schmidt <stefan@osg.samsung.com> | 2015-08-27 16:19:14 +0200 |
---|---|---|
committer | Stefan Schmidt <stefan@osg.samsung.com> | 2015-08-27 16:21:06 +0200 |
commit | 17e5b1c8f61a6dc0aa706338a0ee4c40f7fc6bcc (patch) | |
tree | 3cf136822e83a28fbfe58fb0fe051b8c1a8038a5 /src/lib/ecore_wayland/ecore_wl_window.c | |
parent | f210e429663d9bdb0eadf46d42c0ae8742bc615c (diff) |
ecore_wayland: only add listener if recovery interface was binded correctly
In the case the bidn fails we could crash here by accessing it.
Diffstat (limited to 'src/lib/ecore_wayland/ecore_wl_window.c')
-rw-r--r-- | src/lib/ecore_wayland/ecore_wl_window.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c index 036dc0387c..1c97b458ca 100644 --- a/src/lib/ecore_wayland/ecore_wl_window.c +++ b/src/lib/ecore_wayland/ecore_wl_window.c | |||
@@ -278,7 +278,8 @@ ecore_wl_window_surface_create(Ecore_Wl_Window *win) | |||
278 | 278 | ||
279 | if (!win) return NULL; | 279 | if (!win) return NULL; |
280 | if (win->surface) return win->surface; | 280 | if (win->surface) return win->surface; |
281 | session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery, &_ecore_session_recovery_listener, win); | 281 | if (_ecore_wl_disp->wl.session_recovery) |
282 | session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery, &_ecore_session_recovery_listener, win); | ||
282 | win->surface = wl_compositor_create_surface(_ecore_wl_compositor_get()); | 283 | win->surface = wl_compositor_create_surface(_ecore_wl_compositor_get()); |
283 | if (!win->surface) return NULL; | 284 | if (!win->surface) return NULL; |
284 | win->surface_id = wl_proxy_get_id((struct wl_proxy *)win->surface); | 285 | win->surface_id = wl_proxy_get_id((struct wl_proxy *)win->surface); |