]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiDebugLibConOut/DebugLib.c
1) Initialize gBS, gST, gImageHandle in UefiBootServicesTableLib.c to NULL
[mirror_edk2.git] / MdePkg / Library / UefiDebugLibConOut / DebugLib.c
index 3fe3b6e043f4d2cd1c468fb6979573223355011e..b3e83894c8ab9c4bdb78fe323432cdd37c1f74a1 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Debug Library that uses PrintLib to send messages to CONOUT.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
@@ -65,7 +65,7 @@ DebugPrint (
   //\r
   // Send the print string to the Console Output device\r
   //\r
-  if (gST->ConOut != NULL) {\r
+  if ((gST != NULL) && (gST->ConOut != NULL)) {\r
     gST->ConOut->OutputString (gST->ConOut, Buffer);\r
   }\r
 }\r
@@ -112,7 +112,7 @@ DebugAssert (
   //\r
   // Send the print string to the Console Output device\r
   //\r
-  if (gST->ConOut != NULL) {\r
+  if ((gST != NULL) && (gST->ConOut != NULL)) {\r
     gST->ConOut->OutputString (gST->ConOut, Buffer);\r
   }\r
 \r