anjuta r3835 - in trunk: . plugins/symbol-db



Author: jhs
Date: Wed Apr  9 08:34:29 2008
New Revision: 3835
URL: http://svn.gnome.org/viewvc/anjuta?rev=3835&view=rev

Log:
2008-04-09  Johannes Schmid  <jhs gnome org>

	* plugins/symbol-db/symbol-db-engine.c (sdb_engine_finalize):
	Fixed crasher when deactivating symbol-db plugin

Modified:
   trunk/ChangeLog
   trunk/plugins/symbol-db/symbol-db-engine.c

Modified: trunk/plugins/symbol-db/symbol-db-engine.c
==============================================================================
--- trunk/plugins/symbol-db/symbol-db-engine.c	(original)
+++ trunk/plugins/symbol-db/symbol-db-engine.c	Wed Apr  9 08:34:29 2008
@@ -1788,7 +1788,13 @@
 	
 	dbe = SYMBOL_DB_ENGINE (object);	
 	priv = dbe->priv;
-
+	
+	if (priv->timeout_trigger_handler > 0)
+		g_source_remove (priv->timeout_trigger_handler);
+	
+	if (priv->thread_monitor_handler > 0)
+		g_source_remove (priv->thread_monitor_handler);
+		
 	sdb_engine_disconnect_from_db (dbe);
 	sdb_engine_free_cached_queries (dbe);
 	
@@ -1840,28 +1846,19 @@
 	
 	if (priv->mutex)
 	{
-		/* Let's try that the mutex is not used... */
-		g_mutex_lock (priv->mutex);
-		g_mutex_unlock (priv->mutex);
 		g_mutex_free (priv->mutex);
 		priv->mutex = NULL;
 	}
 	
-	if (priv->timeout_trigger_handler > 0)
-		g_source_remove (priv->timeout_trigger_handler);
-	
-	if (priv->thread_monitor_handler > 0)
-		g_source_remove (priv->thread_monitor_handler);
-	
-	if (priv->signals_queue != NULL)
-		g_async_queue_unref (priv->signals_queue);
-	
 	if (priv->thread_list != NULL)
 		g_queue_free  (priv->thread_list);
 
 	if (priv->sym_type_conversion_hash)
 		g_hash_table_destroy (priv->sym_type_conversion_hash);
 	
+	if (priv->signals_queue != NULL)
+		g_async_queue_unref (priv->signals_queue);
+	
 	sdb_engine_clear_caches (dbe);
 	
 	g_free (priv);



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