Skip to content

Commit

Permalink
- [bug fix] fixed memory leak issue in UI_Pass;
Browse files Browse the repository at this point in the history
  • Loading branch information
stanhome committed Oct 16, 2023
1 parent 319b0ef commit a83d2ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/source/runtime/function/render/passes/ui_pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
Expand Down

0 comments on commit a83d2ff

Please sign in to comment.