[gtksourceview] completion: ref the default info widget.



commit 9ae8cb7a1ee3361506c3a62de400665a6d10d075
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Mon Oct 10 18:39:32 2011 +0200

    completion: ref the default info widget.
    
    We need to ref the widget if we are going to reuse it later.

 gtksourceview/gtksourcecompletion.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index 785c33b..5bdb34a 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -968,6 +968,12 @@ update_proposal_info_real (GtkSourceCompletion         *completion,
 		}
 		else
 		{
+			/* we need to ref the default info widget before removing it */
+			if (gtk_source_completion_info_get_widget (info_window) == completion->priv->default_info)
+			{
+				g_object_ref (completion->priv->default_info);
+			}
+
 			prov_update_info = TRUE;
 		}
 	}



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