X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ShellPkg%2FLibrary%2FUefiShellLib%2FUefiShellLib.c;h=6d885f4681f51df49d83dcb1986ac1997c698cc1;hp=d65f427cee93c8b09277268d0d42a2a9700ac029;hb=8bd282bee9909a0ac414f11c9274c473dbb9a538;hpb=febb227679d9a8b6a4300ce736e631929badb09a diff --git a/ShellPkg/Library/UefiShellLib/UefiShellLib.c b/ShellPkg/Library/UefiShellLib/UefiShellLib.c index d65f427cee..6d885f4681 100644 --- a/ShellPkg/Library/UefiShellLib/UefiShellLib.c +++ b/ShellPkg/Library/UefiShellLib/UefiShellLib.c @@ -1214,10 +1214,13 @@ ShellGetCurrentDir ( return (mEfiShellProtocol->GetCurDir(DeviceName)); } // - // ASSERT that we must have EFI shell + // Check for EFI shell // - ASSERT(mEfiShellEnvironment2 != NULL); - return (mEfiShellEnvironment2->CurDir(DeviceName)); + if (mEfiShellEnvironment2 != NULL) { + return (mEfiShellEnvironment2->CurDir(DeviceName)); + } + + return (NULL); } /** sets (enabled or disabled) the page break mode