LoadedImageDevicePath protocol may be installed with NULL device path, so add check before using the device path.

Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13378 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lzeng14 2012-05-30 10:36:52 +00:00
parent 25fbcc0a58
commit 7ea7eee3a5
1 changed files with 1 additions and 1 deletions

View File

@ -289,7 +289,7 @@ GetNameFromHandle (
&gEfiLoadedImageDevicePathProtocolGuid,
(VOID **) &LoadedImageDevicePath
);
if (!EFI_ERROR (Status)) {
if (!EFI_ERROR (Status) && (LoadedImageDevicePath != NULL)) {
DevicePath = LoadedImageDevicePath;
//