summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiShellLevel1CommandsLib/If.c')
-rw-r--r--ShellPkg/Library/UefiShellLevel1CommandsLib/If.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c b/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
index d305306124..08927319d3 100644
--- a/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
+++ b/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
@@ -739,6 +739,9 @@ MoveToTagSpecial (
//
CommandName = NULL;
CommandName = StrnCatGrow(&CommandName, NULL, CommandNode->Cl, 0);
+ if (CommandName == NULL) {
+ continue;
+ }
CommandWalker = CommandName;
while (CommandWalker[0] == L' ') {
CommandWalker++;