mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
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:
parent
41b67c4722
commit
c141d0a70a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user