Fix the issues,
authorxgu3 <xgu3@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 16 Jan 2007 02:55:46 +0000 (02:55 +0000)
committerxgu3 <xgu3@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 16 Jan 2007 02:55:46 +0000 (02:55 +0000)
bootmaint Null Ptr Error

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2251 6f19259b-4bc3-4df7-8a09-765794883524

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