prevent use-after-free.

This commit is contained in:
aliaspider 2018-03-22 22:10:05 +01:00
parent 2d1128db76
commit fc9a5ff65c
2 changed files with 6 additions and 1 deletions

View File

@ -176,6 +176,7 @@ void LogManager::ChangeFileLog(const char *filename) {
if (fileLog_) {
RemoveListener(fileLog_);
delete fileLog_;
fileLog_ = nullptr;
}
if (filename) {

View File

@ -182,7 +182,11 @@ void TextureCacheVulkan::DeviceLost() {
}
samplerCache_.DeviceLost();
if(samplerNearest_) {
vulkan_->Delete().QueueDeleteSampler(samplerNearest_);
samplerNearest_ = VK_NULL_HANDLE;
}
nextTexture_ = nullptr;
}