elm - cursor - clear cursor job late to avoid crash

during cursor free a move cb seems to add another job again after it
wss already deleted during the free process, so just clear the job
really late instead. valgrind found this one

@fix
This commit is contained in:
Carsten Haitzler 2019-07-09 13:03:31 +01:00
parent 3f42180611
commit 70a3b71aba
1 changed files with 4 additions and 3 deletions

View File

@ -698,9 +698,6 @@ elm_object_cursor_unset(Evas_Object *obj)
{
ELM_CURSOR_GET_OR_RETURN(cur, obj);
if (cur->hotupdate_job) ecore_job_del(cur->hotupdate_job);
cur->hotupdate_job = NULL;
eina_stringshare_del(cur->cursor_name);
cur->cursor_name = NULL;
eina_stringshare_del(cur->style);
@ -754,6 +751,10 @@ elm_object_cursor_unset(Evas_Object *obj)
evas_object_event_callback_del_full(obj, EVAS_CALLBACK_DEL,
_elm_cursor_del, cur);
evas_object_data_del(obj, _cursor_key);
if (cur->hotupdate_job) ecore_job_del(cur->hotupdate_job);
cur->hotupdate_job = NULL;
free(cur);
}