[ekiga/ds-gsettings3] Roster: Fixed crash on invalid iter.



commit de7748a416ed71345b80289fe7c40e2882c95e4e
Author: Damien Sandras <dsandras beip be>
Date:   Sat Dec 14 12:48:35 2013 +0100

    Roster: Fixed crash on invalid iter.

 lib/engine/gui/gtk-frontend/roster-view-gtk.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
index d4e4f7b..1754717 100644
--- a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
+++ b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
@@ -1037,7 +1037,9 @@ on_presentity_added (RosterViewGtk* self,
                                         *group, &group_iter);
     roster_view_gtk_find_iter_for_presentity (self, &group_iter, presentity, &iter);
 
-    if (gtk_tree_model_filter_convert_child_iter_to_iter (filtered_model, &filtered_iter, &iter))
+    if (gtk_tree_store_iter_is_valid (self->priv->store, &iter)
+        && gtk_tree_store_iter_is_valid (self->priv->store, &filtered_iter)
+        && gtk_tree_model_filter_convert_child_iter_to_iter (filtered_model, &filtered_iter, &iter))
       if (gtk_tree_selection_iter_is_selected (selection, &filtered_iter))
        should_emit = TRUE;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]