Merge pull request #15156 from unknownbrackets/vulkan

Vulkan: Fix crash on shutdown after device lost
This commit is contained in:
Henrik Rydgård 2021-11-21 14:57:47 +01:00 committed by GitHub
commit 938e6d83cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -511,9 +511,9 @@ void GPU_Vulkan::InitDeviceObjects() {
void GPU_Vulkan::DestroyDeviceObjects() {
INFO_LOG(G3D, "GPU_Vulkan::DestroyDeviceObjects");
VulkanContext *vulkan = (VulkanContext *)draw_->GetNativeObject(Draw::NativeObject::CONTEXT);
for (int i = 0; i < VulkanContext::MAX_INFLIGHT_FRAMES; i++) {
if (frameData_[i].push_) {
VulkanContext *vulkan = (VulkanContext *)draw_->GetNativeObject(Draw::NativeObject::CONTEXT);
frameData_[i].push_->Destroy(vulkan);
delete frameData_[i].push_;
frameData_[i].push_ = nullptr;