Refine code to make code more safely.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11123 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ydong10
2010-12-06 09:14:47 +00:00
parent 8df0bd287c
commit 54790583c0
4 changed files with 4 additions and 4 deletions

View File

@@ -149,7 +149,7 @@ Returns:
// Try to get the PEI version of ReportStatusCode.
//
Status = GetPeiProtocol (&gEfiStatusCodeRuntimeProtocolGuid, (VOID **) &gReportStatusCode);
if (EFI_ERROR (Status)) {
if (EFI_ERROR (Status) || (gReportStatusCode == NULL)) {
return EFI_UNSUPPORTED;
}
}