1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-26 18:32:08 +00:00

vo_opengl: fix NULL deref on certain init failures

This commit is contained in:
wm4 2016-05-11 17:04:30 +02:00
parent 70b3561270
commit fe540f4477

View File

@ -365,8 +365,10 @@ static void uninit(struct vo *vo)
gl_video_uninit(p->renderer);
gl_hwdec_uninit(p->hwdec);
hwdec_devices_set_loader(vo->hwdec_devs, NULL, NULL);
hwdec_devices_destroy(vo->hwdec_devs);
if (vo->hwdec_devs) {
hwdec_devices_set_loader(vo->hwdec_devs, NULL, NULL);
hwdec_devices_destroy(vo->hwdec_devs);
}
mpgl_uninit(p->glctx);
}