From 9995c2e5d0e1f20111e905834eeefe135fe70ccb Mon Sep 17 00:00:00 2001 From: niruiyu Date: Mon, 8 Aug 2011 09:23:51 +0000 Subject: Add non null assertion before using the bridge instance. Signed-off-by: niruiyu git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12095 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'MdeModulePkg') diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c index 810229f..eba5efd 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c @@ -810,6 +810,12 @@ PciHostBridgeResourceAllocator ( Mem64Bridge = FindResourceNode (RootBridgeDev, &Mem64Pool); PMem64Bridge = FindResourceNode (RootBridgeDev, &PMem64Pool); + ASSERT (IoBridge != NULL); + ASSERT (Mem32Bridge != NULL); + ASSERT (PMem32Bridge != NULL); + ASSERT (Mem64Bridge != NULL); + ASSERT (PMem64Bridge != NULL); + // // Program IO resources // -- cgit v1.1