Skip to content

Commit

Permalink
Fix crash when cubemap face id is invalid (#154)
Browse files Browse the repository at this point in the history
* Fix crash when cubemap face id is invalid

* make variable const
  • Loading branch information
PabloMK7 authored Jun 15, 2024
1 parent 09dc3a5 commit 4f174f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/video_core/rasterizer_cache/rasterizer_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -647,10 +647,11 @@ typename T::Surface& RasterizerCache<T>::GetTextureCube(const TextureCubeConfig&

Surface& cube_surface = slot_surfaces[cube.surface_id];
for (u32 i = 0; i < addresses.size(); i++) {
if (!addresses[i]) {
const SurfaceId& face_id = cube.face_ids[i];
if (!addresses[i] || !face_id) {
continue;
}
Surface& surface = slot_surfaces[cube.face_ids[i]];
Surface& surface = slot_surfaces[face_id];
if (cube.ticks[i] == surface.modification_tick) {
continue;
}
Expand Down

0 comments on commit 4f174f1

Please sign in to comment.