mirror of https://github.com/acidanthera/audk.git
allow for failure return when called without a shell present.
signed-off-by: jcarsey reviewed-by: lgrosenb git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11894 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
febb227679
commit
8bd282bee9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue