summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
Diffstat (limited to 'audio')
-rw-r--r--audio/out/ao.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/out/ao.c b/audio/out/ao.c
index 6cf8de2d88..e643945ec7 100644
--- a/audio/out/ao.c
+++ b/audio/out/ao.c
@@ -605,8 +605,8 @@ void ao_device_list_add(struct ao_device_list *list, struct ao *ao,
c.desc = "Default";
}
}
- c.name = c.name[0] ? talloc_asprintf(list, "%s/%s", dname, c.name)
- : talloc_strdup(list, dname);
+ c.name = (c.name && c.name[0]) ? talloc_asprintf(list, "%s/%s", dname, c.name)
+ : talloc_strdup(list, dname);
c.desc = talloc_strdup(list, c.desc);
MP_TARRAY_APPEND(list, list->devices, list->num_devices, c);
}