]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Check the handle for font package before remove it.
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 4 Feb 2008 03:18:43 +0000 (03:18 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 4 Feb 2008 03:18:43 +0000 (03:18 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4667 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c

index ff4b0c209a0792428ec699a2e0175b86d56694c2..11d1c764a84d39929640597b5bf344e4b9cba4e8 100644 (file)
@@ -618,12 +618,10 @@ GraphicsConsoleControllerDriverStop (
     //\r
     // Remove the font pack\r
     //\r
-#if 1\r
-    HiiLibRemovePackages (Private->HiiHandle);\r
-    mFirstAccessFlag = TRUE;\r
-#else    \r
-    mHii->RemovePack (mHii, Private->HiiHandle);\r
-#endif\r
+    if (Private->HiiHandle != NULL) {\r
+      HiiLibRemovePackages (Private->HiiHandle);\r
+      mFirstAccessFlag = TRUE;\r
+    }\r
 \r
     //\r
     // Free our instance data\r