X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FLibrary%2FUefiBootServicesTableLib%2FUefiBootServicesTableLib.c;h=26f62f6c953220601d28e933a843f7eaa9aad7b3;hp=0db4707e292ffb56ce3e98ac50df5a827038f619;hb=abb234751e4fbe58afc5e7c7e203db2a93aac0f8;hpb=a8e756dad00a922dabe8a9f7d67c25e0d637538f diff --git a/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c b/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c index 0db4707e29..26f62f6c95 100644 --- a/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c +++ b/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c @@ -1,7 +1,7 @@ /** @file UEFI Boot Services Table Library. - 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 @@ -14,9 +14,9 @@ **/ -EFI_HANDLE gImageHandle; -EFI_SYSTEM_TABLE *gST; -EFI_BOOT_SERVICES *gBS; +EFI_HANDLE gImageHandle = NULL; +EFI_SYSTEM_TABLE *gST = NULL; +EFI_BOOT_SERVICES *gBS = NULL; /** The constructor function caches the pointer of Boot Services Table. @@ -43,6 +43,7 @@ UefiBootServicesTableLibConstructor ( // Cache the Image Handle // gImageHandle = ImageHandle; + ASSERT (gImageHandle != NULL); // // Cache pointer to the EFI System Table