summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiep Ha <thiepha@gmail.com>2015-06-25 08:54:36 +0300
committerDaniel Zaoui <daniel.zaoui@samsung.com>2015-06-25 08:54:36 +0300
commitf25823aa4be7e2f3ddbddba006a90bdd68b3f173 (patch)
treed33711089b1fa8ba6d8cbb137d74e09adbd291ef
parent6d94fb95096084d89913775269b855303e0ced69 (diff)
cnp: remove loss callback when object is deleted
Summary: 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. Test Plan: Run elementary test, open Entry, do selection, close Entry window, open Entry one more time, do selection. Reviewers: JackDanielZ Differential Revision: https://phab.enlightenment.org/D2763
-rw-r--r--src/lib/elm_cnp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 0bee00a07..301994d8f 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -669,7 +669,12 @@ static void
669_x11_sel_obj_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) 669_x11_sel_obj_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
670{ 670{
671 X11_Cnp_Selection *sel = data; 671 X11_Cnp_Selection *sel = data;
672 if (sel->widget == obj) sel->widget = NULL; 672 if (sel->widget == obj)
673 {
674 sel->loss_cb = NULL;
675 sel->loss_data = NULL;
676 sel->widget = NULL;
677 }
673 if (dragwidget == obj) dragwidget = NULL; 678 if (dragwidget == obj) dragwidget = NULL;
674} 679}
675 680