Fix NULL-dereference panic if VESA reports zero modes.

MFC after:	1 week
This commit is contained in:
Alexander Motin 2016-05-17 19:00:09 +00:00
parent 23f765d0c8
commit 0f85a96bbf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300072

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);