[FRAMEBUF] Early return if we got 0 available mode from video driver

This prevents allocating 0 bytes of memory a few lines later.
This commit is contained in:
Hervé Poussineau 2021-07-04 23:27:01 +02:00
parent f26fe3f1f8
commit 9b5d029c7a

View file

@ -51,6 +51,11 @@ GetAvailableModes(
return 0;
}
if (Modes.NumModes == 0)
{
return 0;
}
*ModeInfoSize = Modes.ModeInformationLength;
/*