Fix crash in mount dust: add null check for camera pointer

The mount dust code was calling camera->getForward() without checking if
camera was null first, causing a crash that prevented mounting/dismounting.
Added camera null check to the condition.
This commit is contained in:
Kelsi 2026-02-09 01:26:28 -08:00
parent c95c3db03a
commit 71c4fb3ae6
3 changed files with 287 additions and 1 deletions

View file

@ -1264,7 +1264,7 @@ void Renderer::update(float deltaTime) {
mountDust->update(deltaTime);
// Spawn dust when mounted and moving on ground
if (isMounted() && cameraController && !taxiFlight_) {
if (isMounted() && camera && cameraController && !taxiFlight_) {
bool isMoving = cameraController->isMoving();
bool onGround = cameraController->isGrounded();