ecore-wayland: Add safety check for xdg_popup creation

Summary: xdg_shell_get_xdg_popup could return NULL, in which case any
calls below would cause an abort in the wayland libraries, so this
adds a trap for that.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2014-12-01 13:47:10 -05:00
parent 728833ed43
commit 1d0bde0639
1 changed files with 1 additions and 0 deletions

View File

@ -379,6 +379,7 @@ ecore_wl_window_show(Ecore_Wl_Window *win)
_ecore_wl_disp->serial,
win->allocation.x,
win->allocation.y, 0);
if (!win->xdg_popup) return;
xdg_popup_set_user_data(win->xdg_popup, win);
xdg_popup_add_listener(win->xdg_popup,
&_ecore_xdg_popup_listener, win);