MdeModulePkg PiSmmCore: Ensure SxDispatch not NULL before dereferenced

Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
This commit is contained in:
Star Zeng 2017-12-13 11:26:23 +08:00
parent 5c59537c10
commit 1cf2410047
1 changed files with 1 additions and 1 deletions

View File

@ -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.