Fix NULL-dereference panic if VESA reports zero modes.

MFC after:	1 week
This commit is contained in:
mav 2016-05-17 19:00:09 +00:00
parent 002c0ad487
commit 0218beaccb

View File

@ -1025,7 +1025,8 @@ vesa_bios_init(void)
++modes;
}
vesa_vmode[modes].vi_mode = EOT;
if (vesa_vmode != NULL)
vesa_vmode[modes].vi_mode = EOT;
if (bootverbose)
printf("VESA: %d mode(s) found\n", modes);