[PATCH] only call g_hash_table_remove in sftp shutdown if it exists



The attached patch should fix bug 341564 [1]

[1] http://bugzilla.gnome.org/show_bug.cgi?id=341564

-- 
Christian Neumair <chris gnome-de org>
Index: modules/sftp-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/sftp-method.c,v
retrieving revision 1.44
diff -u -p -r1.44 sftp-method.c
--- modules/sftp-method.c	20 Apr 2006 15:55:30 -0000	1.44
+++ modules/sftp-method.c	12 May 2006 21:52:42 -0000
@@ -3297,6 +3297,10 @@ void
 vfs_module_shutdown (GnomeVFSMethod *method)
 {
 	G_LOCK (sftp_connection_table);
-	g_hash_table_foreach_remove (sftp_connection_table, (GHRFunc) close_thunk, NULL);
+
+	if (sftp_connection_table != NULL) {
+		g_hash_table_foreach_remove (sftp_connection_table, (GHRFunc) close_thunk, NULL);
+	}
+
 	G_UNLOCK (sftp_connection_table);
 }


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