From 5ec4715b9d8f8b95f5d75aaa4a948de4641299eb Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Wed, 1 Mar 2017 12:08:09 -0500 Subject: [PATCH] ecore-wl2: Fix efl apps crashing on close in wayland Commit c6b59be1da ensured display cleanup after roundtrips, however we cannot call the display_cleanup function After the display has been disconnected ... oopsie. Essentially the call to the cleanup function was in the wrong place here so fix. Signed-off-by: Chris Michael --- src/lib/ecore_wl2/ecore_wl2_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index 232bbfdc54..689e1e8d3f 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -811,13 +811,14 @@ ecore_wl2_display_disconnect(Ecore_Wl2_Display *display) if (display->refs == 0) { wl_display_roundtrip(display->wl.display); + + _ecore_wl2_display_cleanup(display); + wl_display_disconnect(display->wl.display); /* remove this client display from hash */ eina_hash_del_by_key(_client_displays, display->name); - _ecore_wl2_display_cleanup(display); - free(display->name); free(display); }