mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Move unrecoverable prior to pointer deference.
Change-Id: I35c33de88fd4c2286a678f250df3ff9b3b495097
This commit is contained in:
committed by
sys_ocldev
parent
a9470b9f79
commit
a58a897bf3
@@ -128,6 +128,7 @@ Buffer *Buffer::create(Context *context,
|
||||
bool allocateMemory = true;
|
||||
bool copyMemoryFromHostPtr = false;
|
||||
MemoryManager *memoryManager = context->getMemoryManager();
|
||||
UNRECOVERABLE_IF(!memoryManager);
|
||||
|
||||
GraphicsAllocation::AllocationType allocationType = getGraphicsAllocationType(
|
||||
properties.flags,
|
||||
@@ -135,8 +136,6 @@ Buffer *Buffer::create(Context *context,
|
||||
HwHelper::renderCompressedBuffersSupported(context->getDevice(0)->getHardwareInfo()),
|
||||
memoryManager->isLocalMemorySupported());
|
||||
|
||||
UNRECOVERABLE_IF(!memoryManager);
|
||||
|
||||
checkMemory(properties.flags, size, hostPtr, errcodeRet, alignementSatisfied, copyMemoryFromHostPtr, memoryManager);
|
||||
|
||||
if (errcodeRet != CL_SUCCESS) {
|
||||
|
||||
Reference in New Issue
Block a user