Check for nullptr before make resident

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2022-12-08 10:53:14 +00:00
committed by Compute-Runtime-Automation
parent 3b91cc1b50
commit be5a1c3d08

View File

@@ -410,7 +410,9 @@ void CommandContainer::fillReusableAllocationLists() {
heapSize,
alignedSize,
device->getRootDeviceIndex());
this->immediateCmdListCsr->makeResident(*heapToReuse);
if (heapToReuse != nullptr) {
this->immediateCmdListCsr->makeResident(*heapToReuse);
}
this->heapHelper->storeHeapAllocation(heapToReuse);
}
}