[nautilus-actions] Fix dispose of NATrackerDBus



commit f5451854f6e0c29cb855575381824cd9e34448b0
Author: Pierre Wieser <pwieser trychlos org>
Date:   Wed Mar 3 22:54:55 2010 +0100

    Fix dispose of NATrackerDBus

 ChangeLog                            |    4 ++++
 src/plugin-tracker/na-tracker-dbus.c |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 981ebbb..f5b465d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-03-03 Pierre Wieser <pwieser trychlos org>
 
+	* src/plugin-tracker/na-tracker-dbus.c (instance_dispose):
+	Release selected items in instance_dispose() rather than in
+	instance_finalize() which caused a FPE in Nautilus terminaison.
+
 	* src/api/na-ifactory-object.h:
 	* src/core/na-ifactory-object.c:
 	* src/core/na-iio-provider.c:
diff --git a/src/plugin-tracker/na-tracker-dbus.c b/src/plugin-tracker/na-tracker-dbus.c
index 08c5a59..10d184a 100644
--- a/src/plugin-tracker/na-tracker-dbus.c
+++ b/src/plugin-tracker/na-tracker-dbus.c
@@ -162,6 +162,8 @@ instance_dispose( GObject *object )
 
 		self->private->dispose_has_run = TRUE;
 
+		self->private->selected = free_selected( self->private->selected );
+
 		/* chain up to the parent class */
 		if( G_OBJECT_CLASS( st_parent_class )->dispose ){
 			G_OBJECT_CLASS( st_parent_class )->dispose( object );
@@ -179,8 +181,6 @@ instance_finalize( GObject *object )
 	g_return_if_fail( NA_IS_TRACKER_DBUS( object ));
 	self = NA_TRACKER_DBUS( object );
 
-	self->private->selected = free_selected( self->private->selected );
-
 	g_free( self->private );
 
 	/* chain up to the parent class */



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