]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Make PeCoffExtraActionLib more robust, in case it is called before its constructor...
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 5 Aug 2010 20:03:44 +0000 (20:03 +0000)
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 5 Aug 2010 20:03:44 +0000 (20:03 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10775 6f19259b-4bc3-4df7-8a09-765794883524

Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.c

index 93d9cb2ed09c5ce311fa1bed3c992463e44eb805..a816d704e29b3ace615e6f0b2d53727f07c587f4 100644 (file)
@@ -283,6 +283,10 @@ PeCoffLoaderRelocateImageExtraAction (
 \r
   ASSERT (ImageContext != NULL);\r
 \r
+  if (mWinNt == NULL) {\r
+    return;\r
+  }\r
+\r
        //\r
   // If we load our own PE COFF images the Windows debugger can not source\r
   //  level debug our code. If a valid PDB pointer exists usw it to load\r
@@ -396,6 +400,9 @@ PeCoffLoaderUnloadImageExtraAction (
        VOID *ModHandle;\r
 \r
   ASSERT (ImageContext != NULL);\r
+  if (mWinNt == NULL) {\r
+    return;\r
+  }\r
 \r
   ModHandle = RemoveModeHandle (ImageContext);\r
   if (ModHandle != NULL) {\r