mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2025-01-16 16:42:11 +01:00
Fix crash when cubemap face id is invalid
This commit is contained in:
parent
b8a62e7827
commit
7b0fbdf884
@ -647,10 +647,11 @@ typename T::Surface& RasterizerCache<T>::GetTextureCube(const TextureCubeConfig&
|
|||||||
|
|
||||||
Surface& cube_surface = slot_surfaces[cube.surface_id];
|
Surface& cube_surface = slot_surfaces[cube.surface_id];
|
||||||
for (u32 i = 0; i < addresses.size(); i++) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
Surface& surface = slot_surfaces[cube.face_ids[i]];
|
Surface& surface = slot_surfaces[face_id];
|
||||||
if (cube.ticks[i] == surface.modification_tick) {
|
if (cube.ticks[i] == surface.modification_tick) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user