summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2019-09-02 20:55:51 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2019-09-02 20:55:51 +0900
commit48851138d7a88600638b0fe9be7d04ce7095c4a9 (patch)
tree1e3b96a26f165c29d33c9e66ebb59adfcfc84010 /src
parent78bcc24ecae14f99081100857d82e7b370876821 (diff)
efl_canvas_animation_player: delete previous target event callback
Summary: When target is changed, its event callback related `animation_player` should be deleted. Reviewers: Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9814
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_player.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_animation_player.c b/src/lib/evas/canvas/efl_canvas_animation_player.c
index 8466067a12..aa89c367ff 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_player.c
+++ b/src/lib/evas/canvas/efl_canvas_animation_player.c
@@ -12,6 +12,12 @@ _efl_canvas_animation_player_target_set(Eo *eo_obj EINA_UNUSED,
12 Efl_Canvas_Animation_Player_Data *pd, 12 Efl_Canvas_Animation_Player_Data *pd,
13 Efl_Canvas_Object *target) 13 Efl_Canvas_Object *target)
14{ 14{
15 if (pd->target == target)
16 return;
17
18 if (pd->target)
19 efl_event_callback_del(pd->target, EFL_EVENT_DEL, _target_del_cb, pd);
20
15 efl_event_callback_add(target, EFL_EVENT_DEL, _target_del_cb, pd); 21 efl_event_callback_add(target, EFL_EVENT_DEL, _target_del_cb, pd);
16 22
17 pd->target = target; 23 pd->target = target;