From ecab0d6bb08e036bbfa0512381445d0beae36392 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 14 Feb 2015 16:41:08 +0100 Subject: ao: fix null dereference --- audio/out/ao.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'audio/out') 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; } -- cgit v1.2.3