mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 07:20:49 +00:00
prevent use-after-free.
This commit is contained in:
parent
2d1128db76
commit
fc9a5ff65c
@ -176,6 +176,7 @@ void LogManager::ChangeFileLog(const char *filename) {
|
||||
if (fileLog_) {
|
||||
RemoveListener(fileLog_);
|
||||
delete fileLog_;
|
||||
fileLog_ = nullptr;
|
||||
}
|
||||
|
||||
if (filename) {
|
||||
|
@ -182,7 +182,11 @@ void TextureCacheVulkan::DeviceLost() {
|
||||
}
|
||||
|
||||
samplerCache_.DeviceLost();
|
||||
|
||||
if(samplerNearest_) {
|
||||
vulkan_->Delete().QueueDeleteSampler(samplerNearest_);
|
||||
samplerNearest_ = VK_NULL_HANDLE;
|
||||
}
|
||||
|
||||
nextTexture_ = nullptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user