mirror of https://github.com/mpv-player/mpv
drm_common: add missing zero-initialization of struct vt_mode variable
Some fields were being left uninitialized. This could be a problem particularly on non-Linux OS:s with vt_mode (see PR #6976).
This commit is contained in:
parent
68ce36a2db
commit
bbf6e103b4
|
@ -805,7 +805,7 @@ bool vt_switcher_init(struct vt_switcher *s, struct mp_log *log)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct vt_mode vt_mode;
|
struct vt_mode vt_mode = { 0 };
|
||||||
if (ioctl(s->tty_fd, VT_GETMODE, &vt_mode) < 0) {
|
if (ioctl(s->tty_fd, VT_GETMODE, &vt_mode) < 0) {
|
||||||
MP_ERR(s, "VT_GETMODE failed: %s\n", mp_strerror(errno));
|
MP_ERR(s, "VT_GETMODE failed: %s\n", mp_strerror(errno));
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue