prevent possible NRE

This commit is contained in:
in0finite 2019-07-13 16:27:22 +02:00
parent 1a7a4d5471
commit c6143c3647

View file

@ -90,7 +90,8 @@ namespace SanAndreasUnity.Behaviours.Peds.States
// anim does not set correct velocity
// set it to zero to make the ped stand in place
// this should be done even if parent method changed active state
m_model.RootFrame.LocalVelocity = Vector3.zero;
if (m_model.RootFrame != null)
m_model.RootFrame.LocalVelocity = Vector3.zero;
// if( !this.IsActiveState )
// return;