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:
parent
e543853a7f
commit
ea1b183f4c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user