summaryrefslogtreecommitdiff
path: root/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/UefiDebugLibStdErr/DebugLib.c')
-rw-r--r--MdePkg/Library/UefiDebugLibStdErr/DebugLib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
index 9338217762..d2fb46e23f 100644
--- a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
+++ b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
@@ -1,7 +1,7 @@
/** @file
UEFI Debug Library that uses PrintLib to send messages to STDERR.
- Copyright (c) 2006, Intel Corporation<BR>
+ Copyright (c) 2006 - 2007, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -65,7 +65,7 @@ DebugPrint (
//
// Send the print string to the Standard Error device
//
- if (gST->StdErr != NULL) {
+ if ((gST != NULL) && (gST->StdErr != NULL)) {
gST->StdErr->OutputString (gST->StdErr, Buffer);
}
}
@@ -112,7 +112,7 @@ DebugAssert (
//
// Send the print string to the Standard Error device
//
- if (gST->StdErr != NULL) {
+ if ((gST != NULL) && (gST->StdErr != NULL)) {
gST->StdErr->OutputString (gST->StdErr, Buffer);
}