devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=21a8fbde7e781a7a681db7ec5d1506dd3e582386

commit 21a8fbde7e781a7a681db7ec5d1506dd3e582386
Author: Chris Michael <[email protected]>
Date:   Fri Oct 28 08:57:10 2016 -0400

    evas-wayland-shm: Don't post updates to surface if no surface
    
    In the event that an ecore_evas (using wayland_shm) gets hidden then
    the corresponding wl_surface gets destroyed. If evas_norender is
    called after that, the outbuf_redraws_clear function follows.
    Outbuf_redraw_clear function ends up trying to post updates to the
    wl_surface however if that wl_surface is gone, then we end up crashing.
    
    This patch addresses that issue by checking for a valid wl_surface
    inside the engine before trying to post updates to that wl_surface.
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/modules/evas/engines/wayland_shm/evas_outbuf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c 
b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
index d1cc7bb..c0f5368 100644
--- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
@@ -625,7 +625,8 @@ void
 _evas_outbuf_redraws_clear(Outbuf *ob)
 {
    if (!ob->priv.rect_count) return;
-   ob->surface->funcs.post(ob->surface, ob->priv.rects, ob->priv.rect_count);
+   if (ob->info->info.wl_surface)
+     ob->surface->funcs.post(ob->surface, ob->priv.rects, ob->priv.rect_count);
    free(ob->priv.rects);
    ob->priv.rect_count = 0;
 }

-- 


Reply via email to