[gtksourceview/gtksourcecompletion] Properly handle unref of floating reference in show



commit 660dbabf7fbe5b218bbad43b9b2efbbe09b72e0d
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Sat Sep 19 23:51:51 2009 +0200

    Properly handle unref of floating reference in show

 gtksourceview/gtksourcecompletion.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index 94d2ca8..d4bfa10 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -2520,10 +2520,8 @@ gtk_source_completion_show (GtkSourceCompletion        *completion,
 	
 	if (providers == NULL)
 	{
-		if (g_object_is_floating (context))
-		{
-			g_object_unref (context);
-		}
+		g_object_ref_sink (context);
+		g_object_unref (context);
 
 		return FALSE;
 	}



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