Skip to content

Commit

Permalink
Fix another possible Vulkan shutdown bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Nov 29, 2017
1 parent bc95947 commit 5fff54e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions GPU/Vulkan/DrawEngineVulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5fff54e

Please sign in to comment.