Fix the issues,
authorxgu3 <xgu3@de2fecce-e211-0410-80a6-f3fac2684e05>
Tue, 16 Jan 2007 02:55:46 +0000 (02:55 +0000)
committerxgu3 <xgu3@de2fecce-e211-0410-80a6-f3fac2684e05>
Tue, 16 Jan 2007 02:55:46 +0000 (02:55 +0000)
bootmaint Null Ptr Error

git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@2251 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/EdkUnixPkg/Dxe/PlatformBds/Generic/BootMaint/BootMaint.c

index 9b84db5..69da676 100644 (file)
@@ -449,6 +449,7 @@ Returns:
       Index2                  = (UINT16) (KeyValue - HANDLE_OPTION_OFFSET);\r
 \r
       NewMenuEntry            = BOpt_GetMenuEntry (&DriverMenu, Index2);\r
+      ASSERT (NewMenuEntry != NULL);\r
       Private->HandleContext  = (BM_HANDLE_CONTEXT *) NewMenuEntry->VariableContext;\r
 \r
       CleanUpPage (FORM_DRV_ADD_HANDLE_DESC_ID, Private);\r
@@ -556,6 +557,8 @@ Returns:
   case FORM_CON_COM_ID:\r
     NewMenuEntry                      = BOpt_GetMenuEntry (&TerminalMenu, Private->CurrentTerminal);\r
 \r
+    ASSERT (NewMenuEntry != NULL);\r
+\r
     NewTerminalContext                = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;\r
 \r
     NewTerminalContext->BaudRateIndex = CurrentFakeNVMap->COMBaudRate;\r