[gtksourceview/wip/completion-model: 13/17] Completion: check if the TreeView contains a model



commit 85c7d9fd4fa5268a5d0bf529c49a75f094d80110
Author: SÃbastien Wilmet <swilmet gnome org>
Date:   Tue Jan 22 13:19:19 2013 +0100

    Completion: check if the TreeView contains a model

 gtksourceview/gtksourcecompletion.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index 719d2fd..49cb7ef 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -440,6 +440,14 @@ scroll_to_iter (GtkSourceCompletion *completion,
                 GtkTreeIter         *iter)
 {
 	GtkTreePath *path;
+	GtkTreeModel *model;
+
+	model = gtk_tree_view_get_model (GTK_TREE_VIEW (completion->priv->tree_view_proposals));
+
+	if (model == NULL)
+	{
+		return;
+	}
 
 	path = gtk_tree_model_get_path (GTK_TREE_MODEL (completion->priv->model_proposals),
 	                                iter);



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