diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2019-08-18 10:28:51 +0100 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2019-08-18 10:28:51 +0100 |
commit | ae5fbe49ef9257a75da3c23febe2afa88f0751e2 (patch) | |
tree | 8d3f0b356fcec59051aa5a2ae968051e42bb5efb /src | |
parent | b2ab0a7788d90440a564ff342a7fd7e3cad0c153 (diff) | |
download | efl-ae5fbe49ef9257a75da3c23febe2afa88f0751e2.tar.gz |
elm slider - delete timers on destruction that should be deleted
also use safe free to set to null
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/elementary/elm_slider.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/elementary/elm_slider.c b/src/lib/elementary/elm_slider.c index 97b348bdb4..eab59c1c0d 100644 --- a/src/lib/elementary/elm_slider.c +++ b/src/lib/elementary/elm_slider.c @@ -62,6 +62,7 @@ _delay_change(void *data) { ELM_SLIDER_DATA_GET(data, sd); + if (!sd) return ECORE_CALLBACK_CANCEL; sd->delay = NULL; evas_object_smart_callback_call(data, SIG_DELAY_CHANGED, NULL); @@ -972,15 +973,16 @@ EOLIAN static void _elm_slider_efl_object_destructor(Eo *obj, Elm_Slider_Data *sd) { - ecore_timer_del(sd->wheel_indicator_timer); - evas_object_del(sd->popup); - evas_object_del(sd->popup2); + ELM_SAFE_FREE(sd->delay, ecore_timer_del); + ELM_SAFE_FREE(sd->wheel_indicator_timer, ecore_timer_del); + ELM_SAFE_FREE(sd->popup, evas_object_del); + ELM_SAFE_FREE(sd->popup2, evas_object_del); ELM_SAFE_FREE(sd->indi_template, eina_stringshare_del); - eina_strbuf_free(sd->indi_format_strbuf); + ELM_SAFE_FREE(sd->indi_format_strbuf, eina_strbuf_free); efl_ui_format_func_set(obj, NULL, NULL, NULL); - eina_strbuf_free(sd->format_strbuf); + ELM_SAFE_FREE(sd->format_strbuf, eina_strbuf_free); efl_destructor(efl_super(obj, MY_CLASS)); } |