[gtk+/gtk-3-22] iconview: Fix a problem with the previous change
- From: Matthias Clasen <matthiasc src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gtk+/gtk-3-22] iconview: Fix a problem with the previous change
 
- Date: Wed, 31 Jan 2018 17:37:28 +0000 (UTC)
 
commit 9b69fe7a7ed73b195cb8f996b3c1e6cfc46402b7
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jan 31 17:44:26 2018 +0100
    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 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 4b364d5..6de96bf 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -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];
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]