derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=601f9cc484ce992f3eabf27862f5d12528ba2bd8

commit 601f9cc484ce992f3eabf27862f5d12528ba2bd8
Author: Derek Foreman <[email protected]>
Date:   Fri Jan 26 15:51:44 2018 -0600

    ecore_wl2: Make session recovery more robust
    
    Clear out the window callback when doing session recovery, and
    make sure we have a valid on if we get a double commit.
    
    This should stop a session recovery crash, and fix a small leak per
    recovery.
---
 src/lib/ecore_wl2/ecore_wl2_window.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index d84a302a3f..8ee6e84c21 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -33,6 +33,11 @@ _ecore_wl2_window_semi_free(Ecore_Wl2_Window *window)
    if (window->surface) wl_surface_destroy(window->surface);
    window->surface = NULL;
    window->surface_id = -1;
+
+   if (window->callback) wl_callback_destroy(window->callback);
+   window->callback = NULL;
+
+   window->commit_pending = EINA_FALSE;
 }
 
 static void
@@ -1569,7 +1574,9 @@ ecore_wl2_window_commit(Ecore_Wl2_Window *window, 
Eina_Bool flush)
 
    if (window->commit_pending)
      {
-        wl_callback_destroy(window->callback);
+        if (window->callback)
+          wl_callback_destroy(window->callback);
+        window->callback = NULL;
         ERR("Commit before previous commit processed");
      }
    if (!window->pending.configure)

-- 


Reply via email to