if (!monitor->delete_me)
eina_hash_del(_eio_monitors, monitor->path, monitor);
- if (monitor->exist) eio_file_cancel(monitor->exist);
+ if (monitor->exist)
+ {
+ eio_file_cancel(monitor->exist);
+ monitor->exist = NULL;
+ }
if (monitor->backend)
{
{
Eio_Monitor_Event *ev;
+ if (monitor->delete_me)
+ return;
+
ev = calloc(1, sizeof (Eio_Monitor_Event));
if (!ev) return;
{
const char *tmp;
+ if (monitor->delete_me)
+ return;
+
/* destroy old state */
if (monitor->exist)
{
unsigned int i;
Eina_Bool is_dir;
+ if (backend->parent->delete_me)
+ return;
+
length = file ? strlen(file) : 0;
tmp_length = eina_stringshare_strlen(backend->parent->path) + length + 2;
tmp = alloca(sizeof (char) * tmp_length);
void eio_monitor_backend_del(Eio_Monitor *monitor)
{
+ Eio_Monitor_Backend *backend;
+
if (!_inotify_fdh)
eio_monitor_fallback_del(monitor);
- if (!monitor->backend) return;
-
- eina_hash_del(_inotify_monitors, &monitor->backend->hwnd, monitor->backend);
+ backend = monitor->backend;
monitor->backend = NULL;
+ if (!backend) return;
+
+ eina_hash_del(_inotify_monitors, &backend->hwnd, backend);
}