Add UNRECOVERABLE_IF when bufferAllocation is nullptr

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2021-07-30 07:39:11 +00:00
committed by Compute-Runtime-Automation
parent cee37a43d2
commit 549b458e2f

View File

@@ -42,6 +42,7 @@ ze_result_t CommandQueueImp::initialize(bool copyOnly, bool isInternal) {
returnValue = buffers.initialize(device, totalCmdBufferSize);
if (returnValue == ZE_RESULT_SUCCESS) {
NEO::GraphicsAllocation *bufferAllocation = buffers.getCurrentBufferAllocation();
UNRECOVERABLE_IF(bufferAllocation == nullptr);
commandStream = new NEO::LinearStream(bufferAllocation->getUnderlyingBuffer(),
defaultQueueCmdBufferSize);
UNRECOVERABLE_IF(commandStream == nullptr);