[VGA_NEW]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 17 May 2014 22:55:22 +0000 (22:55 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 17 May 2014 22:55:22 +0000 (22:55 +0000)
Improve order of check against NULL and assignement. Patch by Victor Martinez.
CORE-8121 #resolve #comment Committed in r63340, thanks

svn path=/trunk/; revision=63340

reactos/win32ss/drivers/miniport/vga_new/vbemodes.c

index 68462d6..dfd2f8d 100644 (file)
@@ -213,9 +213,10 @@ InitializeModeTable(IN PHW_DEVICE_EXTENSION VgaExtension)
                                                               &Length);
     if (Status != NO_ERROR) return;
     VbeInfo = VideoPortAllocatePool(VgaExtension, 1, sizeof(VBE_INFO), ' agV');
-    VbeModeInfo = &VbeInfo->Modes;
     if (!VbeInfo) return;
 
+    VbeModeInfo = &VbeInfo->Modes;
+
     /* Init VBE data and write to card buffer */
     VideoDebugPrint((0, "have int10 data\n"));
     VbeInfo->ModeArray[128] = 0xFFFF;