mirror of
https://github.com/mpv-player/mpv
synced 2024-12-22 14:52:43 +00:00
ao: fix null dereference
This commit is contained in:
parent
04472352ae
commit
ecab0d6bb0
@ -499,6 +499,8 @@ bool ao_hotplug_check_update(struct ao_hotplug *hp)
|
|||||||
|
|
||||||
const char *ao_hotplug_get_detected_device(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;
|
return hp->ao->detected_device;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user