Merge branch 'mcatanzaro/#5619' into 'main'

filesystemmodel: fix crash when file is removed

Closes #5619

See merge request GNOME/gtk!5550
This commit is contained in:
Matthias Clasen 2023-02-23 16:24:06 +00:00
commit b0fc2f99ba

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);