diff options
author | Cedric Bail <cedric@osg.samsung.com> | 2018-05-02 09:11:21 -0700 |
---|---|---|
committer | Cedric Bail <cedric@osg.samsung.com> | 2018-05-02 10:46:34 -0700 |
commit | c3072e77e636d1d39c2536e19010d4c4d57e99dc (patch) | |
tree | de45fc16c5fa1fbb68aad2f80dada6c9395584cf | |
parent | b2437c03390423347f1c386a817765dc20978081 (diff) | |
download | efl-c3072e77e636d1d39c2536e19010d4c4d57e99dc.tar.gz |
eio: prevent asynchronous destruction of object while thread is still running.
-rw-r--r-- | src/lib/eio/eio_model.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c index 721539a6b1..85ad57a2ef 100644 --- a/src/lib/eio/eio_model.c +++ b/src/lib/eio/eio_model.c @@ -339,6 +339,7 @@ _eio_build_st_done(void *data, Eio_File *handler EINA_UNUSED, const Eina_Stat *s } _eio_child_delete(model, pd); + efl_unref(model); } static void @@ -353,6 +354,7 @@ _eio_build_st_error(void *data, Eio_File *handler EINA_UNUSED, int error) efl_model_properties_changed(model, "direct_info", "mtime", "atime", "ctime", "is_dir", "is_lnk", "size", "stat"); _eio_child_delete(model, pd); + efl_unref(model); } static void @@ -362,7 +364,7 @@ _eio_build_st(const Eio_Model *model, Eio_Model_Data *pd) if (pd->request.stat) return ; if (pd->error) return ; - pd->request.stat = eio_file_direct_stat(pd->path, _eio_build_st_done, _eio_build_st_error, model); + pd->request.stat = eio_file_direct_stat(pd->path, _eio_build_st_done, _eio_build_st_error, efl_ref(model)); } static Eina_List *delayed_queue = NULL; |