summaryrefslogtreecommitdiff
path: root/src/lib/eio/eio_model.c
diff options
context:
space:
mode:
authorCedric Bail <cedric@osg.samsung.com>2018-05-02 09:11:21 -0700
committerCedric Bail <cedric@osg.samsung.com>2018-05-02 10:46:34 -0700
commitc3072e77e636d1d39c2536e19010d4c4d57e99dc (patch)
treede45fc16c5fa1fbb68aad2f80dada6c9395584cf /src/lib/eio/eio_model.c
parentb2437c03390423347f1c386a817765dc20978081 (diff)
eio: prevent asynchronous destruction of object while thread is still running.
Diffstat (limited to 'src/lib/eio/eio_model.c')
-rw-r--r--src/lib/eio/eio_model.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index 721539a..85ad57a 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
339 } 339 }
340 340
341 _eio_child_delete(model, pd); 341 _eio_child_delete(model, pd);
342 efl_unref(model);
342} 343}
343 344
344static void 345static void
@@ -353,6 +354,7 @@ _eio_build_st_error(void *data, Eio_File *handler EINA_UNUSED, int error)
353 efl_model_properties_changed(model, "direct_info", "mtime", "atime", "ctime", "is_dir", "is_lnk", "size", "stat"); 354 efl_model_properties_changed(model, "direct_info", "mtime", "atime", "ctime", "is_dir", "is_lnk", "size", "stat");
354 355
355 _eio_child_delete(model, pd); 356 _eio_child_delete(model, pd);
357 efl_unref(model);
356} 358}
357 359
358static void 360static void
@@ -362,7 +364,7 @@ _eio_build_st(const Eio_Model *model, Eio_Model_Data *pd)
362 if (pd->request.stat) return ; 364 if (pd->request.stat) return ;
363 if (pd->error) return ; 365 if (pd->error) return ;
364 366
365 pd->request.stat = eio_file_direct_stat(pd->path, _eio_build_st_done, _eio_build_st_error, model); 367 pd->request.stat = eio_file_direct_stat(pd->path, _eio_build_st_done, _eio_build_st_error, efl_ref(model));
366} 368}
367 369
368static Eina_List *delayed_queue = NULL; 370static Eina_List *delayed_queue = NULL;