1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 09:02:38 +00:00

vo_drm: fix segfault when using invalid card

This commit is contained in:
rr- 2016-10-06 20:01:31 +02:00 committed by wm4
parent e543853a7f
commit ea1b183f4c

View File

@ -392,10 +392,10 @@ static void uninit(struct vo *vo)
struct priv *p = vo->priv;
crtc_release(vo);
for (unsigned int i = 0; i < BUF_COUNT; i++)
fb_destroy(p->kms->fd, &p->bufs[i]);
if (p->kms) {
for (unsigned int i = 0; i < BUF_COUNT; i++)
fb_destroy(p->kms->fd, &p->bufs[i]);
kms_destroy(p->kms);
p->kms = NULL;
}