Skip to content

Commit

Permalink
vulkan fix for apache#7672
Browse files Browse the repository at this point in the history
  • Loading branch information
tmoreau89 committed Mar 17, 2021
1 parent 870d433 commit 97209a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/runtime/vulkan/vulkan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ class VulkanDeviceAPI final : public DeviceAPI {
// finish all the vulkan commands that reference the buffer.
StreamSync(ctx, nullptr);

if (ptr == nullptr) {
return;
}

const auto& vctx = context(ctx.device_id);
auto* pbuf = static_cast<VulkanBuffer*>(ptr);
vkDestroyBuffer(vctx.device, pbuf->buffer, nullptr);
Expand Down

0 comments on commit 97209a9

Please sign in to comment.