Evas (wayland_egl): Add traps for a NULL rendering engine.
authordevilhorns <devilhorns@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 31 Jul 2012 06:59:35 +0000 (06:59 +0000)
committerdevilhorns <devilhorns@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 31 Jul 2012 06:59:35 +0000 (06:59 +0000)
This can happen when rapidly opening & closing windows and when
engines are swapped between shm & egl programmatically.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@74616 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/modules/engines/wayland_egl/evas_engine.c

index 588174d..f45c840 100644 (file)
@@ -846,6 +846,8 @@ eng_output_redraws_rect_add(void *data, int x, int y, int w, int h)
    Render_Engine *re;
 
    re = (Render_Engine *)data;
+   if ((!re) || (!re->win)) return;
+
    eng_window_use(re->win);
    evas_gl_common_context_resize(re->win->gl_context, re->win->w, re->win->h, re->win->rot);
    evas_common_tilebuf_add_redraw(re->tb, x, y, w, h);
@@ -1952,6 +1954,8 @@ static Eina_Bool
 eng_canvas_alpha_get(void *data, void *info __UNUSED__)
 {
    Render_Engine *re = (Render_Engine *)data;
+
+   if ((!re) || (!re->win)) return EINA_FALSE;
    return re->win->alpha;
 }