diff --git a/Common/LogManager.cpp b/Common/LogManager.cpp index 50375b8c21..c138f34533 100644 --- a/Common/LogManager.cpp +++ b/Common/LogManager.cpp @@ -176,6 +176,7 @@ void LogManager::ChangeFileLog(const char *filename) { if (fileLog_) { RemoveListener(fileLog_); delete fileLog_; + fileLog_ = nullptr; } if (filename) { diff --git a/GPU/Vulkan/TextureCacheVulkan.cpp b/GPU/Vulkan/TextureCacheVulkan.cpp index 73085778f1..cd2fd70008 100644 --- a/GPU/Vulkan/TextureCacheVulkan.cpp +++ b/GPU/Vulkan/TextureCacheVulkan.cpp @@ -182,7 +182,11 @@ void TextureCacheVulkan::DeviceLost() { } samplerCache_.DeviceLost(); - vulkan_->Delete().QueueDeleteSampler(samplerNearest_); + + if(samplerNearest_) { + vulkan_->Delete().QueueDeleteSampler(samplerNearest_); + samplerNearest_ = VK_NULL_HANDLE; + } nextTexture_ = nullptr; }