mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-03-05 07:37:17 +00:00
fix NRE in GetCameraFocusPos()
This commit is contained in:
parent
57bb127345
commit
e9b944cad5
1 changed files with 4 additions and 1 deletions
|
@ -107,7 +107,10 @@ namespace SanAndreasUnity.Behaviours.Peds.States
|
|||
|
||||
public new Vector3 GetCameraFocusPos()
|
||||
{
|
||||
return m_ped.CurrentVehicle.transform.position;
|
||||
if (m_ped.CurrentVehicle != null)
|
||||
return m_ped.CurrentVehicle.transform.position;
|
||||
else
|
||||
return base.GetCameraFocusPos();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue