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 | |
parent | f210e429663d9bdb0eadf46d42c0ae8742bc615c (diff) | |
download | efl-17e5b1c8f61a6dc0aa706338a0ee4c40f7fc6bcc.tar.gz |
ecore_wayland: only add listener if recovery interface was binded correctly
In the case the bidn fails we could crash here by accessing it.
-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) if (!win) return NULL; if (win->surface) return win->surface; - session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery, &_ecore_session_recovery_listener, win); + if (_ecore_wl_disp->wl.session_recovery) + session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery, &_ecore_session_recovery_listener, win); win->surface = wl_compositor_create_surface(_ecore_wl_compositor_get()); if (!win->surface) return NULL; win->surface_id = wl_proxy_get_id((struct wl_proxy *)win->surface); |