Permalink
Browse files

Fix another possible Vulkan shutdown bug

  • Loading branch information...
hrydgard committed Nov 29, 2017
1 parent bc95947 commit 5fff54e8046f913fc0f4e5e8cb94a8018658e2a6
Showing with 5 additions and 3 deletions.
  1. +5 −3 GPU/Vulkan/DrawEngineVulkan.cpp
@@ -247,9 +247,11 @@ void DrawEngineVulkan::DestroyDeviceObjects() {
delete nullTexture_;
nullTexture_ = nullptr;
}
vertexCache_->Destroy(vulkan_);
delete vertexCache_;
vertexCache_ = nullptr;
if (vertexCache_) {
vertexCache_->Destroy(vulkan_);
delete vertexCache_;
vertexCache_ = nullptr;
}
// Need to clear this to get rid of all remaining references to the dead buffers.
vai_.Iterate([](uint32_t hash, VertexArrayInfoVulkan *vai) {
delete vai;

0 comments on commit 5fff54e

Please sign in to comment.