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
diff --git a/PerformancePkg/Dp_App/DpUtilities.c b/PerformancePkg/Dp_App/DpUtilities.c
index 0d4e17a..f44745f 100644
--- a/PerformancePkg/Dp_App/DpUtilities.c
+++ b/PerformancePkg/Dp_App/DpUtilities.c
@@ -289,7 +289,7 @@
                   &gEfiLoadedImageDevicePathProtocolGuid,

                   (VOID **) &LoadedImageDevicePath

                   );

-  if (!EFI_ERROR (Status)) {

+  if (!EFI_ERROR (Status) && (LoadedImageDevicePath != NULL)) {

     DevicePath = LoadedImageDevicePath;

 

     //