changeset 2787:30b1a9a6b768

fix bug in cleaning up
author mf0102 <0102@gmx.at>
date Wed, 09 Jul 2008 13:18:17 +0200
parents b7d8e6fd4644
children 3a615c9d2bb1
files src/streambrowser/streambrowser.c
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/streambrowser/streambrowser.c	Tue Jul 08 15:37:33 2008 +0200
+++ b/src/streambrowser/streambrowser.c	Wed Jul 09 13:18:17 2008 +0200
@@ -37,9 +37,9 @@
 
 static GtkWidget*		playlist_menu_item;
 static GtkWidget*		main_menu_item;
-static GQueue*			update_thread_data_queue;
+static GQueue*			update_thread_data_queue = NULL;
 static gint			update_thread_count = 0;
-static GMutex*			update_thread_mutex;
+static GMutex*			update_thread_mutex = NULL;
 
 
 streambrowser_cfg_t		streambrowser_cfg;
@@ -191,10 +191,14 @@
 	streambrowser_win_done();
 	
 	/* others */
-	g_mutex_free(update_thread_mutex);
-	g_queue_free(update_thread_data_queue);
+	if (update_thread_mutex)
+		g_mutex_free(update_thread_mutex);
+	update_thread_mutex = NULL;
+	if (update_thread_data_queue)
+		g_queue_free(update_thread_data_queue);
+	update_thread_data_queue = NULL;
 
-	debug("gui destroied\n");
+	debug("gui destroyed\n");
 }
 
 static void config_load()