mirror of https://github.com/acidanthera/audk.git
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:
parent
cb26370805
commit
485a505713
|
@ -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.
|
||||||
|
|
|
@ -1170,7 +1170,7 @@ BdsSetMemoryTypeInformationVariable (
|
||||||
&gEfiMemoryTypeInformationGuid,
|
&gEfiMemoryTypeInformationGuid,
|
||||||
(VOID **) &CurrentMemoryTypeInformation
|
(VOID **) &CurrentMemoryTypeInformation
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status) || CurrentMemoryTypeInformation == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue