jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=85d45ee9b199967fadc65c7337a1fa3e56ac55f3

commit 85d45ee9b199967fadc65c7337a1fa3e56ac55f3
Author: Jean-Philippe Andre <[email protected]>
Date:   Fri Jul 8 14:33:01 2016 +0900

    elm: Fix cnp crash on WL
    
    See D4144.
    
    Original author: @slotus.lee
    
    SEG_FAULT happens when the object which has selection is deleted,
    and new selection is done at another object.
    Reason: loss_cb is not removed when the object which has selection is 
deleted.
    When new selection is set for new object, the loss_cb is called for deleted
    object. As result, SEG_FAULT happens.
    This issue was also happened in X11 (https://phab.enlightenment.org/D2763)
    
    Test plan:
    (on wayland environment) Run elementary test, open Entry, do selection,
    close Entry window, open Entry one more time, do selection.
---
 src/lib/elementary/elm_cnp.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
index 855e7d8..26904bd 100644
--- a/src/lib/elementary/elm_cnp.c
+++ b/src/lib/elementary/elm_cnp.c
@@ -2820,7 +2820,12 @@ static void
 _wl_sel_obj_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void 
*event_info EINA_UNUSED)
 {
    Wl_Cnp_Selection *sel = data;
-   if (sel->widget == obj) sel->widget = NULL;
+   if (sel->widget == obj)
+     {
+        sel->loss_cb = NULL;
+        sel->loss_data = NULL;
+        sel->widget = NULL;
+     }
    if (dragwidget == obj) dragwidget = NULL;
 }
 

-- 


Reply via email to