Skip to content

Commit 63bea08

Browse files
committed
Add an existence check for debug callback in createCommandBuffers_impl.
1 parent 7963dbd commit 63bea08

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/nbl/video/CVulkanLogicalDevice.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,12 @@ bool CVulkanLogicalDevice::createCommandBuffers_impl(IGPUCommandPool* cmdPool, I
177177
{
178178
for (uint32_t i = 0u; i < count; ++i)
179179
{
180+
const auto* debugCb = m_physicalDevice->getDebugCallback();
181+
180182
outCmdBufs[i] = core::make_smart_refctd_ptr<CVulkanCommandBuffer>(
181183
core::smart_refctd_ptr<ILogicalDevice>(this), level, vk_commandBuffers[i],
182184
core::smart_refctd_ptr<IGPUCommandPool>(cmdPool),
183-
core::smart_refctd_ptr<system::ILogger>(m_physicalDevice->getDebugCallback()->getLogger()));
185+
debugCb ? core::smart_refctd_ptr<system::ILogger>(debugCb->getLogger()) : nullptr);
184186
}
185187

186188
return true;

0 commit comments

Comments
 (0)