[gtksourceview] Completion: check if the TreeView contains a model
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Completion: check if the TreeView contains a model
- Date: Sat, 26 Jan 2013 15:34:14 +0000 (UTC)
commit 999f0d22b5dd556a843d289146d8dfe59ded4a90
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]