mirror of
https://github.com/PabloMK7/citra.git
synced 2024-11-24 00:14:16 +00:00
Fix crash when cubemap face id is invalid (#154)
* Fix crash when cubemap face id is invalid * make variable const
This commit is contained in:
parent
09dc3a5592
commit
4f174f1c0b
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue