texcache: unprotect vram immediately even if actual Delete is delayed

Fixes MINIDUMP-A5, MINIDUMP-AF
This commit is contained in:
Flyinghead 2023-02-22 17:57:31 +01:00
parent f885cbb4ea
commit cf9ccea70b
1 changed files with 3 additions and 2 deletions

View File

@ -453,11 +453,11 @@ void BaseTextureCacheData::unprotectVRam()
bool BaseTextureCacheData::Delete()
{
unprotectVRam();
if (custom_load_in_progress > 0)
return false;
unprotectVRam();
free(custom_image_data);
custom_image_data = nullptr;
@ -625,6 +625,7 @@ void BaseTextureCacheData::Update()
else
{
WARN_LOG(RENDERER, "Warning: invalid texture. Address %08X %08X size %d", sa_tex, sa, size);
unprotectVRam();
return;
}
}