Prevent a class of crashes in monitoring
This commit is contained in:
parent
1ec41f7749
commit
2d10aa8b61
|
@ -346,6 +346,8 @@ static void
|
||||||
monitor_apply(enum monitor_event event, GPtrArray *target, int index,
|
monitor_apply(enum monitor_event event, GPtrArray *target, int index,
|
||||||
FivIoModelEntry *new_entry)
|
FivIoModelEntry *new_entry)
|
||||||
{
|
{
|
||||||
|
g_return_if_fail(event != MONITOR_CHANGING || index >= 0);
|
||||||
|
|
||||||
if (event == MONITOR_RENAMING && index < 0)
|
if (event == MONITOR_RENAMING && index < 0)
|
||||||
// The file used to be filtered out but isn't anymore.
|
// The file used to be filtered out but isn't anymore.
|
||||||
event = MONITOR_ADDING;
|
event = MONITOR_ADDING;
|
||||||
|
|
Loading…
Reference in New Issue