[anjuta] sourceview: Hold a reference on the provider (related to #611272)



commit d8139ea6e9ae7b06e7b15f21f7b3150f95e45ecb
Author: Johannes Schmid <jhs gnome org>
Date:   Wed Mar 3 22:49:03 2010 +0100

    sourceview: Hold a reference on the provider (related to #611272)

 plugins/sourceview/sourceview-provider.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plugins/sourceview/sourceview-provider.c b/plugins/sourceview/sourceview-provider.c
index 7558cd2..2c49ea2 100644
--- a/plugins/sourceview/sourceview-provider.c
+++ b/plugins/sourceview/sourceview-provider.c
@@ -115,7 +115,8 @@ sourceview_provider_init (SourceviewProvider *object)
 static void
 sourceview_provider_dispose (GObject* obj)
 {
-
+	SourceviewProvider* prov = SOURCEVIEW_PROVIDER(obj);
+	g_object_unref (prov->iprov);
 }
 
 static void
@@ -133,6 +134,7 @@ GtkSourceCompletionProvider* sourceview_provider_new (Sourceview* sv,
 	SourceviewProvider* prov = SOURCEVIEW_PROVIDER(obj);
 	prov->sv = sv;
 	prov->iprov = iprov;
+	g_object_ref (prov->iprov);
 	return GTK_SOURCE_COMPLETION_PROVIDER(obj);
 }
 



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