Fix another possible Vulkan shutdown bug

This commit is contained in:
Henrik Rydgård 2017-11-29 19:15:08 +01:00
parent bc959470e5
commit 5fff54e804

View File

@ -247,9 +247,11 @@ void DrawEngineVulkan::DestroyDeviceObjects() {
delete nullTexture_; delete nullTexture_;
nullTexture_ = nullptr; nullTexture_ = nullptr;
} }
vertexCache_->Destroy(vulkan_); if (vertexCache_) {
delete vertexCache_; vertexCache_->Destroy(vulkan_);
vertexCache_ = nullptr; delete vertexCache_;
vertexCache_ = nullptr;
}
// Need to clear this to get rid of all remaining references to the dead buffers. // Need to clear this to get rid of all remaining references to the dead buffers.
vai_.Iterate([](uint32_t hash, VertexArrayInfoVulkan *vai) { vai_.Iterate([](uint32_t hash, VertexArrayInfoVulkan *vai) {
delete vai; delete vai;