mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
ao: fix null dereference
This commit is contained in:
@@ -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