diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c index 1ccb9c7787..f136b5d569 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c @@ -321,7 +321,7 @@ SmmReadyToBootHandler ( NULL, (VOID **)&SxDispatch ); - if (!EFI_ERROR (Status)) { + if (!EFI_ERROR (Status) && (SxDispatch != NULL)) { // // Register a S3 entry callback function to // determine if it will be during S3 resume.