summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-05-31 14:09:04 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-05-31 14:09:04 +0000
commitb3a5bafbf9b521a3c9deabb60c06cf1aa058fe9d (patch)
tree98bc09b82b2845961b97ab350db1367de4db060d
parent814aed96a2c0afa4218cc4384425934fd30faa68 (diff)
Only call headset_free if the device actually has headset support
-rw-r--r--audio/manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/audio/manager.c b/audio/manager.c
index d4ebdffd..748f2b71 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -235,7 +235,8 @@ static audio_device_t *create_device(bdaddr_t *bda)
static void remove_device(audio_device_t *device)
{
devices = g_slist_remove(devices, device);
- headset_free(device->object_path);
+ if (device->headset)
+ headset_free(device->object_path);
dbus_connection_destroy_object_path(connection, device->object_path);
g_free(device);
}