diff options
Diffstat (limited to 'MdePkg/Library/DxeReportStatusCodeLib')
-rw-r--r-- | MdePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/MdePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c b/MdePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c index 4e140c61c8..28649f72cc 100644 --- a/MdePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c +++ b/MdePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c @@ -1,7 +1,7 @@ /** @file
Report Status Code Library for DXE Phase.
- 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
@@ -57,6 +57,9 @@ InternalReportStatusCode ( // in the handle database.
//
if (gStatusCode == NULL) {
+ if (gBS == NULL) {
+ return EFI_UNSUPPORTED;
+ }
Status = gBS->LocateProtocol (&gEfiStatusCodeRuntimeProtocolGuid, NULL, (VOID **)&gStatusCode);
if (EFI_ERROR (Status) || gStatusCode == NULL) {
return EFI_UNSUPPORTED;
@@ -476,6 +479,10 @@ ReportStatusCodeEx ( ASSERT (!((ExtendedData == NULL) && (ExtendedDataSize != 0)));
ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));
+ if (gBS == NULL) {
+ return EFI_UNSUPPORTED;
+ }
+
//
// Allocate space for the Status Code Header and its buffer
//
|