ShellInitialize (\r
)\r
{\r
+ EFI_STATUS Status;\r
+\r
//\r
// if auto initialize is not false then skip\r
//\r
//\r
// deinit the current stuff\r
//\r
- ASSERT_EFI_ERROR(ShellLibDestructor(gImageHandle, gST));\r
+ Status = ShellLibDestructor (gImageHandle, gST);\r
+ ASSERT_EFI_ERROR (Status);\r
\r
//\r
// init the new stuff\r
Status = ShellFileHandleReadLine(Handle, RetVal, &Size, FALSE, Ascii);\r
\r
}\r
- if (Status == EFI_END_OF_FILE && *RetVal != CHAR_NULL) {\r
+ if (Status == EFI_END_OF_FILE && RetVal != NULL && *RetVal != CHAR_NULL) {\r
Status = EFI_SUCCESS;\r
}\r
if (EFI_ERROR(Status) && (RetVal != NULL)) {\r