Fix crash when GPUBuffer creation fails on D3D11

This commit is contained in:
2026-06-15 18:00:25 +02:00
parent 3d669dbba0
commit 981d982824
@@ -107,6 +107,8 @@ bool GPUBufferDX11::OnInit()
data.SysMemSlicePitch = 0;
}
VALIDATE_DIRECTX_CALL(_device->GetDevice()->CreateBuffer(&bufferDesc, _desc.InitData ? &data : nullptr, &_resource));
if (!_resource)
return true;
// Set state
DX_SET_DEBUG_NAME(_resource, GetName());