X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FLibrary%2FDxeReportStatusCodeLib%2FReportStatusCodeLib.c;h=28649f72cc3b126f8d433edea2c07414cdbedc6b;hp=4e140c61c85a7cb6c85f1123c79e5dfd5faf91c4;hb=abb234751e4fbe58afc5e7c7e203db2a93aac0f8;hpb=582510249f2fb1334e507b99421b9485f6b89159 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
+ Copyright (c) 2006 - 2007, Intel Corporation
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 //