iconview: Fix a problem with the previous change

After commit ffef28a7e8,
gtk-icon-browser was spewing critical warnings when
changing sections. Avoid that by respecting the return
value of gtk_tree_model_get_iter.
This commit is contained in:
Matthias Clasen 2018-01-31 17:44:26 +01:00
parent c94993e29b
commit 9b69fe7a7e

View File

@ -3510,8 +3510,8 @@ gtk_icon_view_row_deleted (GtkTreeModel *model,
if (gtk_tree_path_get_depth (path) > 1)
return;
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_unref_node (model, &iter);
if (gtk_tree_model_get_iter (model, &iter, path))
gtk_tree_model_unref_node (model, &iter);
index = gtk_tree_path_get_indices(path)[0];