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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c b/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
index 1d83f8a246..62c713e589 100644
--- a/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
+++ b/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
@@ -95,6 +95,10 @@ IsValidProfile (
CONST CHAR16 *TempLocation;
ProfilesString = ShellGetEnvironmentVariable(L"profiles");
+ //
+ // According to the Shell spec this is a required environment variable.
+ //
+ ASSERT(ProfileString != NULL);
TempLocation = StrStr(ProfilesString, String);
if ((TempLocation != NULL) && (*(TempLocation-1) == L';') && (*(TempLocation+StrLen(String)) == L';')) {
return (TRUE);