filesystemmodel: fix crash when file is removed

In 32247bc50e node_get_for_file() was
changed to return GTK_INVALID_LIST_POSITION rather than 0 when the file
is untracked. Most call sites were updated accordingly, but this one was
missed.

Fixes #5619
This commit is contained in:
Michael Catanzaro 2023-02-23 09:20:03 -06:00
parent 41b67c4722
commit c141d0a70a

View File

@ -459,7 +459,7 @@ remove_file (GtkFileSystemModel *model,
g_return_if_fail (G_IS_FILE (file));
id = node_get_for_file (model, file);
if (id == 0)
if (id == GTK_INVALID_LIST_POSITION)
return;
node = get_node (model, id);