diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c index 4c48b65fbc..345808a1ea 100644 --- a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c +++ b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c @@ -107,9 +107,13 @@ CommandInit( // // Without clue provided use the first Unicode Collation2 protocol. + // This may happen when PlatformLang is NULL or when no installed Unicode + // Collation2 protocol instance supports PlatformLang. // - if (PlatformLang == NULL) { + if (gUnicodeCollation == NULL) { gUnicodeCollation = Uc; + } + if (PlatformLang == NULL) { break; }