git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7350
6f19259b-4bc3-4df7-8a09-
765794883524
//\r
BdsLibConnectAllDriversToAllControllers ();\r
Status = gBS->LocateHandleBuffer (ByProtocol, &gEfiBlockIoProtocolGuid, NULL, &BlockIoHandleCount, &BlockIoBuffer);\r
- if (EFI_ERROR (Status) || BlockIoHandleCount == 0) {\r
+ if (EFI_ERROR (Status) || BlockIoHandleCount == 0 || BlockIoBuffer == NULL) {\r
//\r
// If there was an error or there are no device handles that support\r
// the BLOCK_IO Protocol, then return.\r
&gEfiMemoryTypeInformationGuid,\r
(VOID **) &CurrentMemoryTypeInformation\r
);\r
- if (EFI_ERROR (Status)) {\r
+ if (EFI_ERROR (Status) || CurrentMemoryTypeInformation == NULL) {\r
return;\r
}\r
\r