Skip to content

Commit

Permalink
fix crash spamming train controls
Browse files Browse the repository at this point in the history
  • Loading branch information
wootguy committed Jan 12, 2025
1 parent 0fd4ca7 commit a1e4d08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dlls/player/CBasePlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2481,7 +2481,7 @@ void CBasePlayer::PreThink(void)
//ALERT( at_error, "In train mode with no train!\n" );
m_afPhysicsFlags &= ~PFLAG_ONTRAIN;
m_iTrain = TRAIN_NEW|TRAIN_OFF;
if (pTrain->Classify() == CLASS_VEHICLE)
if (pTrain && pTrain->Classify() == CLASS_VEHICLE)
((CFuncVehicle*)pTrain)->m_pDriver = NULL;
return;
}
Expand Down

0 comments on commit a1e4d08

Please sign in to comment.