diff --git a/engine/source/runtime/function/render/passes/ui_pass.cpp b/engine/source/runtime/function/render/passes/ui_pass.cpp index 0caef5c89..c81bbda53 100644 --- a/engine/source/runtime/function/render/passes/ui_pass.cpp +++ b/engine/source/runtime/function/render/passes/ui_pass.cpp @@ -49,7 +49,7 @@ namespace Piccolo allocInfo.commandPool = m_rhi->getCommandPoor(); allocInfo.commandBufferCount = 1; - RHICommandBuffer* commandBuffer = new VulkanCommandBuffer(); + RHICommandBuffer* commandBuffer = nullptr; if (RHI_SUCCESS != m_rhi->allocateCommandBuffers(&allocInfo, commandBuffer)) { throw std::runtime_error("failed to allocate command buffers!");