Add NULL pointer checking against Data.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10724 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xli24 2010-07-30 08:38:52 +00:00
parent c8e073513b
commit bc369e7975
3 changed files with 6 additions and 3 deletions

View File

@ -129,7 +129,8 @@ SerialStatusCodeReportWorker (
Value,
Instance
);
} else if (CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeStringGuid) &&
} else if (Data != NULL &&
CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeStringGuid) &&
((EFI_STATUS_CODE_STRING_DATA *) Data)->StringType == EfiStringAscii) {
//
// EFI_STATUS_CODE_STRING_DATA

View File

@ -125,7 +125,8 @@ SerialStatusCodeReportWorker (
Value,
Instance
);
} else if (CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeStringGuid) &&
} else if (Data != NULL &&
CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeStringGuid) &&
((EFI_STATUS_CODE_STRING_DATA *) Data)->StringType == EfiStringAscii) {
//
// EFI_STATUS_CODE_STRING_DATA

View File

@ -125,7 +125,8 @@ SerialStatusCodeReportWorker (
Value,
Instance
);
} else if (CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeStringGuid) &&
} else if (Data != NULL &&
CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeStringGuid) &&
((EFI_STATUS_CODE_STRING_DATA *) Data)->StringType == EfiStringAscii) {
//
// EFI_STATUS_CODE_STRING_DATA