summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-18 10:28:51 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-18 10:28:51 +0100
commitae5fbe49ef9257a75da3c23febe2afa88f0751e2 (patch)
tree8d3f0b356fcec59051aa5a2ae968051e42bb5efb
parentb2ab0a7788d90440a564ff342a7fd7e3cad0c153 (diff)
elm slider - delete timers on destruction that should be deleted
also use safe free to set to null
-rw-r--r--src/lib/elementary/elm_slider.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/elementary/elm_slider.c b/src/lib/elementary/elm_slider.c
index 97b348b..eab59c1 100644
--- a/src/lib/elementary/elm_slider.c
+++ b/src/lib/elementary/elm_slider.c
@@ -62,6 +62,7 @@ _delay_change(void *data)
62{ 62{
63 ELM_SLIDER_DATA_GET(data, sd); 63 ELM_SLIDER_DATA_GET(data, sd);
64 64
65 if (!sd) return ECORE_CALLBACK_CANCEL;
65 sd->delay = NULL; 66 sd->delay = NULL;
66 evas_object_smart_callback_call(data, SIG_DELAY_CHANGED, NULL); 67 evas_object_smart_callback_call(data, SIG_DELAY_CHANGED, NULL);
67 68
@@ -972,15 +973,16 @@ EOLIAN static void
972_elm_slider_efl_object_destructor(Eo *obj, 973_elm_slider_efl_object_destructor(Eo *obj,
973 Elm_Slider_Data *sd) 974 Elm_Slider_Data *sd)
974{ 975{
975 ecore_timer_del(sd->wheel_indicator_timer); 976 ELM_SAFE_FREE(sd->delay, ecore_timer_del);
976 evas_object_del(sd->popup); 977 ELM_SAFE_FREE(sd->wheel_indicator_timer, ecore_timer_del);
977 evas_object_del(sd->popup2); 978 ELM_SAFE_FREE(sd->popup, evas_object_del);
979 ELM_SAFE_FREE(sd->popup2, evas_object_del);
978 980
979 ELM_SAFE_FREE(sd->indi_template, eina_stringshare_del); 981 ELM_SAFE_FREE(sd->indi_template, eina_stringshare_del);
980 eina_strbuf_free(sd->indi_format_strbuf); 982 ELM_SAFE_FREE(sd->indi_format_strbuf, eina_strbuf_free);
981 983
982 efl_ui_format_func_set(obj, NULL, NULL, NULL); 984 efl_ui_format_func_set(obj, NULL, NULL, NULL);
983 eina_strbuf_free(sd->format_strbuf); 985 ELM_SAFE_FREE(sd->format_strbuf, eina_strbuf_free);
984 986
985 efl_destructor(efl_super(obj, MY_CLASS)); 987 efl_destructor(efl_super(obj, MY_CLASS));
986} 988}