summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--audio/out/ao.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/audio/out/ao.c b/audio/out/ao.c
index c7065f386a..1593769716 100644
--- a/audio/out/ao.c
+++ b/audio/out/ao.c
@@ -499,6 +499,8 @@ bool ao_hotplug_check_update(struct ao_hotplug *hp)
const char *ao_hotplug_get_detected_device(struct ao_hotplug *hp)
{
+ if (!hp || !hp->ao)
+ return NULL;
return hp->ao->detected_device;
}