GPU: More consistently clear ptrs on DeviceLost().

Rather get a null pointer crash than confusing buggy use-after-free
excitement.
This commit is contained in:
Unknown W. Brackets committed 2022-08-23 20:15:30 -07:00
1 parent 47b7305bf5
commit 7ec62a32b4
11 files changed
+17 -2

No files matched your search

+1
View File
@@ -168,6 +168,7 @@ void SamplerCache::DeviceLost() {
vulkan_->Delete().QueueDeleteSampler(sampler);
});
cache_.Clear();
vulkan_ = nullptr;
}
void SamplerCache::DeviceRestore(VulkanContext *vulkan) {