E Comp (wayland): Add check for empty surface list (and bail out) and

add checks for valid buffer, and valid border.



SVN revision: 67575
This commit is contained in:
Christopher Michael 2012-01-28 22:51:19 +00:00
parent 26f6478d62
commit 9619be1673
1 changed files with 7 additions and 1 deletions

View File

@ -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)
{