--- gstreamer/libs/gst/controller/gstcontroller.c.orig	2006-09-24 10:36:23.000000000 +0200
+++ gstreamer/libs/gst/controller/gstcontroller.c	2006-09-24 10:38:19.000000000 +0200
@@ -483,6 +483,7 @@
         if (!self) {
           self = g_object_new (GST_TYPE_CONTROLLER, NULL);
           self->object = object;
+	  g_object_ref (object);
           /* store the controller */
           g_object_set_qdata (object, __gst_controller_key, self);
         } else {
@@ -536,6 +537,7 @@
         if (!self) {
           self = g_object_new (GST_TYPE_CONTROLLER, NULL);
           self->object = object;
+	  g_object_ref (object);
           /* store the controller */
           g_object_set_qdata (object, __gst_controller_key, self);
         } else {
@@ -1192,6 +1194,8 @@
   /* remove controller from objects qdata list */
   g_object_set_qdata (self->object, __gst_controller_key, NULL);
 
+  g_object_unref (self->object);
+  
   if (G_OBJECT_CLASS (parent_class)->finalize)
     (G_OBJECT_CLASS (parent_class)->finalize) (object);
 }
