aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/elementary/test_efl_anim_interpolator.c
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2019-01-16 10:07:12 -0500
committerDerek Foreman <derek.foreman.samsung@gmail.com>2019-01-16 11:17:15 -0600
commitbff4c35322f08a56caf0a49d23a7d67d838a3093 (patch)
tree018e6f51cc5d931c9b11dbb1128bd9587e6df75f /src/bin/elementary/test_efl_anim_interpolator.c
parenttest_efl_anim_interpolator: Minor formatting fixes (diff)
downloadefl-bff4c35322f08a56caf0a49d23a7d67d838a3093.tar.gz
test_efl_anim_interpolator: delete animation event callback on window delete
elementary_test Efl.Animation.Interpolator test performs Invalid memory access if the window is closed during the animation. This can lead to elm_test crashing after the main window is closed. In order to avoid this invalid memory access, when the window gets deleted we can delete the efl_event_callback so that the event does not fire while the window is being deleted. ref https://phab.enlightenment.org/T7392 Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Differential Revision: https://phab.enlightenment.org/D7644
Diffstat (limited to 'src/bin/elementary/test_efl_anim_interpolator.c')
-rw-r--r--src/bin/elementary/test_efl_anim_interpolator.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bin/elementary/test_efl_anim_interpolator.c b/src/bin/elementary/test_efl_anim_interpolator.c
index ff5162e6ac..ca2e2446f9 100644
--- a/src/bin/elementary/test_efl_anim_interpolator.c
+++ b/src/bin/elementary/test_efl_anim_interpolator.c
@@ -139,6 +139,16 @@ static void
_win_del_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
App_Data *ad = data;
+ int i;
+
+ for (i = 0; i < INTERP_NUM; i++)
+ {
+ //Unregister callback called when window deletes
+ efl_event_callback_del(ad->anim_obj[i],
+ EFL_ANIMATION_PLAYER_EVENT_ENDED,
+ _anim_ended_cb, ad);
+ }
+
free(ad);
}