summaryrefslogtreecommitdiff
path: root/gtk/gtkiconview.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2018-01-31 17:44:26 +0100
committerMatthias Clasen <mclasen@redhat.com>2018-01-31 17:44:26 +0100
commit8916ff8ffeb07ead0575364771e69c5be797f7c4 (patch)
treeed91cd5dca8b55d4d339ce36625f403c6d0a9ef4 /gtk/gtkiconview.c
parent02892c59d171ce86335567ef2101d52899b1ebe7 (diff)
downloadgtk+-8916ff8ffeb07ead0575364771e69c5be797f7c4.tar.gz
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.
Diffstat (limited to 'gtk/gtkiconview.c')
-rw-r--r--gtk/gtkiconview.c4
1 files 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];