Author: aandrejevic Date: Sun Oct 23 17:21:58 2016 New Revision: 73028
URL: http://svn.reactos.org/svn/reactos?rev=73028&view=rev Log: [NTVDM:VBE]: Don't crash if the video mode is invalid.
Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/vbe.c
Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/vbe.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/bios/... ============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/vbe.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/vbe.c [iso-8859-1] Sun Oct 23 17:21:58 2016 @@ -356,6 +356,7 @@ BOOLEAN WINAPI VbeSetExtendedVideoMode(BYTE ModeNumber) { PCVBE_MODE Mode = VbeGetModeByNumber(ModeNumber); + if (Mode == NULL) return FALSE;
/* At this point, Mode->Registers shouldn't be NULL unless the mode is unimplemented */ if (Mode->Registers == NULL)