/** @file\r
Report Status Code Library for DXE Phase.\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
// in the handle database.\r
//\r
if (gStatusCode == NULL) {\r
+ if (gBS == NULL) {\r
+ return EFI_UNSUPPORTED;\r
+ }\r
Status = gBS->LocateProtocol (&gEfiStatusCodeRuntimeProtocolGuid, NULL, (VOID **)&gStatusCode);\r
if (EFI_ERROR (Status) || gStatusCode == NULL) {\r
return EFI_UNSUPPORTED;\r
ASSERT (!((ExtendedData == NULL) && (ExtendedDataSize != 0)));\r
ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));\r
\r
+ if (gBS == NULL) {\r
+ return EFI_UNSUPPORTED;\r
+ }\r
+\r
//\r
// Allocate space for the Status Code Header and its buffer\r
//\r