Add more checkpoint for deference pointer.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7350 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2 2009-01-23 04:45:48 +00:00
parent cb26370805
commit 485a505713
2 changed files with 2 additions and 2 deletions

View File

@ -411,7 +411,7 @@ BdsExpandPartitionPartialDevicePathToFull (
// //
BdsLibConnectAllDriversToAllControllers (); BdsLibConnectAllDriversToAllControllers ();
Status = gBS->LocateHandleBuffer (ByProtocol, &gEfiBlockIoProtocolGuid, NULL, &BlockIoHandleCount, &BlockIoBuffer); Status = gBS->LocateHandleBuffer (ByProtocol, &gEfiBlockIoProtocolGuid, NULL, &BlockIoHandleCount, &BlockIoBuffer);
if (EFI_ERROR (Status) || BlockIoHandleCount == 0) { if (EFI_ERROR (Status) || BlockIoHandleCount == 0 || BlockIoBuffer == NULL) {
// //
// If there was an error or there are no device handles that support // If there was an error or there are no device handles that support
// the BLOCK_IO Protocol, then return. // the BLOCK_IO Protocol, then return.

View File

@ -1170,7 +1170,7 @@ BdsSetMemoryTypeInformationVariable (
&gEfiMemoryTypeInformationGuid, &gEfiMemoryTypeInformationGuid,
(VOID **) &CurrentMemoryTypeInformation (VOID **) &CurrentMemoryTypeInformation
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status) || CurrentMemoryTypeInformation == NULL) {
return; return;
} }