mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-26 21:36:27 -05:00
Correct possible error on Rasterizer Caches
There was a weird bug that could happen if the object died directly and the cache address wasn't stored.
This commit is contained in:
parent
c63e68c480
commit
3a08c3207b
1 changed files with 2 additions and 1 deletions
|
@ -147,8 +147,9 @@ protected:
|
||||||
|
|
||||||
object->SetIsRegistered(false);
|
object->SetIsRegistered(false);
|
||||||
rasterizer.UpdatePagesCachedCount(object->GetCpuAddr(), object->GetSizeInBytes(), -1);
|
rasterizer.UpdatePagesCachedCount(object->GetCpuAddr(), object->GetSizeInBytes(), -1);
|
||||||
|
const CacheAddr addr = object->GetCacheAddr();
|
||||||
interval_cache.subtract({GetInterval(object), ObjectSet{object}});
|
interval_cache.subtract({GetInterval(object), ObjectSet{object}});
|
||||||
map_cache.erase(object->GetCacheAddr());
|
map_cache.erase(addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a ticks counter used for tracking when cached objects were last modified
|
/// Returns a ticks counter used for tracking when cached objects were last modified
|
||||||
|
|
Loading…
Reference in a new issue