summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Automobile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehicles/Automobile.cpp')
-rw-r--r--src/vehicles/Automobile.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index fbcf610c..9fa0df39 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -273,12 +273,13 @@ CAutomobile::ProcessControl(void)
}
// Process driver
- if(IsUpsideDown() && CanPedEnterCar()){
- if(!pDriver->IsPlayer() &&
- !(pDriver->m_leader && pDriver->m_leader->bInVehicle) &&
- pDriver->CharCreatedBy != MISSION_CHAR)
- pDriver->SetObjective(OBJECTIVE_LEAVE_VEHICLE, this);
- }
+ if(pDriver)
+ if(IsUpsideDown() && CanPedEnterCar()){
+ if(!pDriver->IsPlayer() &&
+ !(pDriver->m_leader && pDriver->m_leader->bInVehicle) &&
+ pDriver->CharCreatedBy != MISSION_CHAR)
+ pDriver->SetObjective(OBJECTIVE_LEAVE_VEHICLE, this);
+ }
ActivateBombWhenEntered();