diff --git a/GPU/Vulkan/DrawEngineVulkan.cpp b/GPU/Vulkan/DrawEngineVulkan.cpp index 82908e0048..73fb6afe4e 100644 --- a/GPU/Vulkan/DrawEngineVulkan.cpp +++ b/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;