ao: fix null dereference
This commit is contained in:
1 parent
04472352ae
commit
ecab0d6bb0
1 file changed
+2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user