From ad745aae63b0c5e3d918fbadcee54d269240b5a3 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Wed, 20 Jan 2021 21:12:42 +0300 Subject: some more script --- src/core/PlayerInfo.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp index f0f3e2c6..64f3b9d0 100644 --- a/src/core/PlayerInfo.cpp +++ b/src/core/PlayerInfo.cpp @@ -420,8 +420,10 @@ CPlayerInfo::Process(void) CTimer::Update(); } m_bInRemoteMode = false; - CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle->bRemoveFromWorld = true; - CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle = nil; + if (CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle) { + CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle->bRemoveFromWorld = true; + CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle = nil; + } if (FindPlayerVehicle()) { FindPlayerVehicle()->SetStatus(STATUS_PLAYER); } -- cgit v1.2.3