aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2015-08-27 16:19:14 +0200
committerStefan Schmidt <stefan@osg.samsung.com>2015-08-27 16:21:06 +0200
commit17e5b1c8f61a6dc0aa706338a0ee4c40f7fc6bcc (patch)
tree3cf136822e83a28fbfe58fb0fe051b8c1a8038a5
parentedje: Fix double free scenario caused by static pointer. (diff)
downloadefl-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.c3
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);