diff options
Diffstat (limited to 'ShellPkg/Library/UefiShellLevel1CommandsLib/For.c')
-rw-r--r-- | ShellPkg/Library/UefiShellLevel1CommandsLib/For.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellLevel1CommandsLib/For.c b/ShellPkg/Library/UefiShellLevel1CommandsLib/For.c index 64110099d3..b8e4805d92 100644 --- a/ShellPkg/Library/UefiShellLevel1CommandsLib/For.c +++ b/ShellPkg/Library/UefiShellLevel1CommandsLib/For.c @@ -565,7 +565,9 @@ ShellCommandRunFor ( Info->RemoveSubstAlias = TRUE;
}
}
- CurrentScriptFile->CurrentCommand->Data = Info;
+ if (CurrentScriptFile->CurrentCommand != NULL) {
+ CurrentScriptFile->CurrentCommand->Data = Info;
+ }
} else {
ShellPrintHiiEx(
-1,
|