Fix Bluetooth disconnect race condition
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 30 Aug 2009 06:28:07 +0000 (23:28 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 30 Aug 2009 06:28:07 +0000 (23:28 -0700)
plugins/bluetooth.c

index a0dafc6..69a5ebb 100644 (file)
@@ -763,6 +763,9 @@ static void bluetooth_disconnect(DBusConnection *connection, void *user_data)
 {
        DBG("connection %p", connection);
 
+       if (bluetooth_devices == NULL)
+               return;
+
        g_hash_table_destroy(bluetooth_devices);
        bluetooth_devices = NULL;
 }