16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 16:19:19 +02:00

Check if Train pointer is not nullptr

This commit is contained in:
docentYT
2026-05-11 23:48:13 +02:00
parent 4878afbffc
commit 4e0b4e6ff6

View File

@@ -597,7 +597,7 @@ void driver_mode::update_camera(double const Deltatime)
} }
else else
{ {
if (false == FreeFlyModeFlag) if (false == FreeFlyModeFlag && simulation::Train)
{ {
// reset cached view angle in the cab // reset cached view angle in the cab
simulation::Train->pMechViewAngle = {Camera.Angle.x, Camera.Angle.y}; simulation::Train->pMechViewAngle = {Camera.Angle.x, Camera.Angle.y};