RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
1.01k stars 178 forks source link

Fixed crash when reloading actor during race #2992

Closed ohlidalp closed 1 year ago

ohlidalp commented 1 year ago

Reported on Discord by The Jesser#8202

Problem: Race display in top menubar tries to access Actor which was already deleted.

Cause: the top menubar is rendered in between removing the actor and updating the simbuffer, so it draws a dangling Actor pointer from the simbuffer.

Broken by: 547227575fa58a5ed9a2218fa78d6297c8906f42 where the race display was moved to top menubar.

Fix: Update simbuffer immediately after removing actor.