summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-12-01 13:47:10 -0500
committerChris Michael <cp.michael@samsung.com>2014-12-01 13:47:10 -0500
commit1d0bde0639fa81021c2f1b8f9ef114a5c1944ecf (patch)
treed67932b7e0ae1eda02becb8dda3baf805aed1484
parent728833ed43c562d2dcd57a585e8819d35a34bc71 (diff)
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>
-rw-r--r--src/lib/ecore_wayland/ecore_wl_window.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c
index 5fe6410..46b8618 100644
--- a/src/lib/ecore_wayland/ecore_wl_window.c
+++ b/src/lib/ecore_wayland/ecore_wl_window.c
@@ -379,6 +379,7 @@ ecore_wl_window_show(Ecore_Wl_Window *win)
379 _ecore_wl_disp->serial, 379 _ecore_wl_disp->serial,
380 win->allocation.x, 380 win->allocation.x,
381 win->allocation.y, 0); 381 win->allocation.y, 0);
382 if (!win->xdg_popup) return;
382 xdg_popup_set_user_data(win->xdg_popup, win); 383 xdg_popup_set_user_data(win->xdg_popup, win);
383 xdg_popup_add_listener(win->xdg_popup, 384 xdg_popup_add_listener(win->xdg_popup,
384 &_ecore_xdg_popup_listener, win); 385 &_ecore_xdg_popup_listener, win);