Merge pull request #939 from jonnxie/master

Fixed potential memory leak bug.
This commit is contained in:
Sascha Willems 2022-04-18 21:22:30 +02:00 committed by GitHub
commit 11db901ecc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -273,6 +273,10 @@ void vkglTF::Texture::fromglTfImage(tinygltf::Image &gltfimage, std::string path
vkCmdPipelineBarrier(blitCmd, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, nullptr, 0, nullptr, 1, &imageMemoryBarrier); vkCmdPipelineBarrier(blitCmd, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 0, nullptr, 0, nullptr, 1, &imageMemoryBarrier);
} }
if (deleteBuffer) {
delete[] buffer;
}
device->flushCommandBuffer(blitCmd, copyQueue, true); device->flushCommandBuffer(blitCmd, copyQueue, true);
} }
else { else {