summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellLevel1CommandsLib/Shift.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiShellLevel1CommandsLib/Shift.c')
-rw-r--r--ShellPkg/Library/UefiShellLevel1CommandsLib/Shift.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellLevel1CommandsLib/Shift.c b/ShellPkg/Library/UefiShellLevel1CommandsLib/Shift.c
index 4c0debe..d550682 100644
--- a/ShellPkg/Library/UefiShellLevel1CommandsLib/Shift.c
+++ b/ShellPkg/Library/UefiShellLevel1CommandsLib/Shift.c
@@ -35,7 +35,10 @@ ShellCommandRunShift (
}
CurrentScriptFile = ShellCommandGetCurrentScriptFile ();
- ASSERT (CurrentScriptFile != NULL);
+ if (CurrentScriptFile == NULL) {
+ ASSERT (CurrentScriptFile != NULL);
+ return (SHELL_INVALID_PARAMETER);
+ }
if (CurrentScriptFile->Argc < 2) {
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"shift");