FyroxEngine / Fyrox

3D and 2D game engine written in Rust
https://fyrox.rs
MIT License
7.48k stars 339 forks source link

Preventing NavigationLayer from trying to change focus when tab_list is empty. #636

Closed b-guild closed 2 months ago

b-guild commented 2 months ago

I discovered that tab navigation can panic due a mod 0 operation, and tracked the issue down to navigation.rs where the algorithm assumes that tab_list is not empty. I presume that when tab_list is empty, the correct thing to do is nothing.