summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-06-23 18:57:42 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-06-23 18:57:42 +0000
commit32274fc77d459ab72868d15bf1f65f8fa74c6013 (patch)
tree21eafaa13ab196e6e1c78621d451796e975e6a92
parent2cc84f09868d94aad737853b12ab41f4b83a1db9 (diff)
Handle systems without a default headset
-rw-r--r--audio/manager.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/audio/manager.c b/audio/manager.c
index fca8d47a..65a27f5f 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -1126,7 +1126,10 @@ static void register_devices_stored(const char *adapter)
if (stat(filename, &s) == 0 && (s.st_mode & __S_IFREG)) {
textfile_foreach(filename, parse_stored_devices, &src);
+
addr = textfile_get(filename, "default");
+ if (!addr)
+ return;
str2ba(addr, &dst);
default_dev = find_device(&dst);