forked from enlightenment/enlightenment
e17/fileman: fix segv: ni->monitor could be NULL
SVN revision: 81629
This commit is contained in:
parent
9473ab1ccd
commit
edff7270a5
|
@ -92,7 +92,7 @@ _event_deleted(Nav_Item *ni, int type, void *e)
|
|||
if (type == EIO_MONITOR_ERROR)
|
||||
{
|
||||
//donteven.jpg
|
||||
eio_monitor_del(ni->monitor);
|
||||
if (ni->monitor) eio_monitor_del(ni->monitor);
|
||||
ni->monitor = eio_monitor_stringshared_add(ni->path);
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
@ -673,6 +673,7 @@ _box_button_append(Instance *inst, const char *label, Edje_Signal_Cb func)
|
|||
}
|
||||
ni->path = eina_stringshare_add(path);
|
||||
ni->monitor = eio_monitor_stringshared_add(ni->path);
|
||||
if (!ni->monitor) DBG("failed to add file monitor: %s", ni->path);
|
||||
E_LIST_HANDLER_APPEND(ni->handlers, EIO_MONITOR_SELF_DELETED, _event_deleted, ni);
|
||||
E_LIST_HANDLER_APPEND(ni->handlers, EIO_MONITOR_SELF_RENAME, _event_deleted, ni);
|
||||
E_LIST_HANDLER_APPEND(ni->handlers, EIO_MONITOR_ERROR, _event_deleted, ni);
|
||||
|
|
Loading…
Reference in New Issue