elm_test_widget_focus: cleanup callbacks correctly

we need to delete the callback here, otherwise the objects are deleted
later on, which:
- changes focus, which leads to
- callbacks executed with stacked addresses from a dead function

this fixes a testsuite failure on the release build.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D10020
This commit is contained in:
Marcel Hollerbach 2019-09-19 14:43:31 +02:00 committed by Cedric Bail
parent e06e03f220
commit 6960751c45
1 changed files with 2 additions and 0 deletions

View File

@ -201,6 +201,8 @@ EFL_START_TEST(elm_test_widget_focus_simple_widget)
ck_assert_int_eq(flag_unfocused, EINA_TRUE);
ck_assert_int_eq(elm_object_focus_get(resettor), EINA_TRUE);
ck_assert_int_eq(elm_object_focus_get(o), EINA_FALSE);
evas_object_smart_callback_del_full(o, "focused", _eventing_test, &flag_focused);
evas_object_smart_callback_del_full(o, "unfocused", _eventing_test, &flag_unfocused);
}
eina_hash_free(map);