From 8916ff8ffeb07ead0575364771e69c5be797f7c4 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 31 Jan 2018 17:44:26 +0100 Subject: [PATCH] iconview: Fix a problem with the previous change After commit ffef28a7e8d5ffef7de6a3baccb30b0021b6b0ff, gtk-icon-browser was spewing critical warnings when changing sections. Avoid that by respecting the return value of gtk_tree_model_get_iter. --- gtk/gtkiconview.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 86be6f8c42..0a7ed4be88 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -3314,8 +3314,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];