From 38c0d70af863b85ffbd0e4c8e6a63c2167c31145 Mon Sep 17 00:00:00 2001 From: qwang12 Date: Mon, 4 Feb 2008 03:18:43 +0000 Subject: Check the handle for font package before remove it. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4667 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'MdeModulePkg/Universal') diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c index ff4b0c209a..11d1c764a8 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c @@ -618,12 +618,10 @@ GraphicsConsoleControllerDriverStop ( // // Remove the font pack // -#if 1 - HiiLibRemovePackages (Private->HiiHandle); - mFirstAccessFlag = TRUE; -#else - mHii->RemovePack (mHii, Private->HiiHandle); -#endif + if (Private->HiiHandle != NULL) { + HiiLibRemovePackages (Private->HiiHandle); + mFirstAccessFlag = TRUE; + } // // Free our instance data -- cgit v1.2.3