summaryrefslogtreecommitdiffstats
path: root/ShellPkg
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c6
1 files changed, 5 insertions, 1 deletions
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;
}