diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-27 16:45:41 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-27 16:45:41 +0000 |
commit | 8bd282bee9909a0ac414f11c9274c473dbb9a538 (patch) | |
tree | eae51950947054728a09ea5d65f97e8059b5be6e /ShellPkg | |
parent | febb227679d9a8b6a4300ce736e631929badb09a (diff) | |
download | edk2-platforms-8bd282bee9909a0ac414f11c9274c473dbb9a538.tar.xz |
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
Diffstat (limited to 'ShellPkg')
-rw-r--r-- | ShellPkg/Library/UefiShellLib/UefiShellLib.c | 9 |
1 files changed, 6 insertions, 3 deletions
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
|