summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-08-15 09:58:19 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-08-15 09:58:19 +0000
commita79bcc5733cb5898abb878fb3cfe8ba27fef7bdf (patch)
treed41a2da522736b4ec767121df40d5af6ac50b74a /audio
parent962e84af6703db98d6fccaa654502f040619a846 (diff)
check find_adapter return value for NULL
Diffstat (limited to 'audio')
-rw-r--r--audio/device.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/audio/device.c b/audio/device.c
index 87ddf5b7..63ab7778 100644
--- a/audio/device.c
+++ b/audio/device.c
@@ -206,6 +206,8 @@ struct device *device_register(DBusConnection *conn,
return NULL;
adapter_path = find_adapter(conn, &src);
+ if (!adapter_path)
+ return NULL;
dev = g_new0(struct device, 1);