diff --git a/MdePkg/Library/UefiLib/Acpi.c b/MdePkg/Library/UefiLib/Acpi.c index 4df6731ff0..59a828835c 100644 --- a/MdePkg/Library/UefiLib/Acpi.c +++ b/MdePkg/Library/UefiLib/Acpi.c @@ -67,7 +67,7 @@ ScanTableInSDT ( EntryPtr = 0; CopyMem (&EntryPtr, (VOID *)(BasePtr + Index * TablePointerSize), TablePointerSize); Table = (EFI_ACPI_COMMON_HEADER *)((UINTN)(EntryPtr)); - if (Table->Signature == Signature) { + if ((Table != NULL) && (Table->Signature == Signature)) { if (PreviousTable != NULL) { if (Table == PreviousTable) { *PreviousTableLocated = TRUE;