From 9619be1673e86946a6f5b4f18433dcec7ebc440e Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Sat, 28 Jan 2012 22:51:19 +0000 Subject: [PATCH] E Comp (wayland): Add check for empty surface list (and bail out) and add checks for valid buffer, and valid border. SVN revision: 67575 --- src/modules/comp/e_mod_comp_wl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/modules/comp/e_mod_comp_wl.c b/src/modules/comp/e_mod_comp_wl.c index b97c04795..73d2fbda1 100644 --- a/src/modules/comp/e_mod_comp_wl.c +++ b/src/modules/comp/e_mod_comp_wl.c @@ -144,11 +144,17 @@ e_mod_comp_wl_pixmap_get(Ecore_X_Window win) struct wl_list *list; Ecore_X_Pixmap pmap = 0; + LOGFN(__FILE__, __LINE__, __FUNCTION__); + comp = e_mod_comp_wl_comp_get(); + if (wl_list_empty(&comp->surfaces)) return 0; + list = &comp->surfaces; wl_list_for_each(ws, list, link) { - if ((ws->win) && (ws->win->border->win == win)) + if (!ws->buffer) continue; + if (((ws->win) && (ws->win->border)) + && (ws->win->border->win == win)) { if (ws->buffer) {