소스 검색

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.
Fernando Sahmkow 7 년 전
부모
커밋
3a08c3207b
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/video_core/rasterizer_cache.h

+ 2 - 1
src/video_core/rasterizer_cache.h

@@ -147,8 +147,9 @@ protected:
 
         object->SetIsRegistered(false);
         rasterizer.UpdatePagesCachedCount(object->GetCpuAddr(), object->GetSizeInBytes(), -1);
+        const CacheAddr addr = object->GetCacheAddr();
         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