mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 14:50:07 +00:00
cocoa: don't uninit light sensor if not present
This commit is contained in:
parent
1bab7f69ae
commit
678cd30904
@ -226,8 +226,10 @@ static void cocoa_init_light_sensor(struct vo *vo)
|
||||
|
||||
static void cocoa_uninit_light_sensor(struct vo_cocoa_state *s)
|
||||
{
|
||||
IONotificationPortDestroy(s->light_sensor_io_port);
|
||||
IOObjectRelease(s->light_sensor);
|
||||
if (s->light_sensor_io_port) {
|
||||
IONotificationPortDestroy(s->light_sensor_io_port);
|
||||
IOObjectRelease(s->light_sensor);
|
||||
}
|
||||
}
|
||||
|
||||
int vo_cocoa_init(struct vo *vo)
|
||||
|
Loading…
Reference in New Issue
Block a user