summaryrefslogtreecommitdiffstats
path: root/src/core/World.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/World.cpp')
-rw-r--r--src/core/World.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/World.cpp b/src/core/World.cpp
index d026e971..70e526e8 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -866,10 +866,9 @@ CVehicle*
FindPlayerVehicle(void)
{
CPlayerPed *ped = FindPlayerPed();
- if(ped->InVehicle())
+ if(ped && ped->InVehicle())
return ped->m_pMyVehicle;
- else
- return nil;
+ return nil;
}
CVehicle*