Add null check to Rhino code

This commit is contained in:
Silent 2019-03-07 18:54:21 +01:00
parent 65862b38cf
commit 3a40147ce9
No known key found for this signature in database
GPG key ID: AE53149BB0C45AF1

View file

@ -680,11 +680,17 @@ void CAutomobile::Fix_SilentPatch()
Door[REAR_LEFT_DOOR].SetExtraWheelPositions( 1.0f, 1.0f, 1.0f, 1.0f ); Door[REAR_LEFT_DOOR].SetExtraWheelPositions( 1.0f, 1.0f, 1.0f, 1.0f );
Door[REAR_RIGHT_DOOR].SetExtraWheelPositions( 1.0f, 1.0f, 1.0f, 1.0f ); Door[REAR_RIGHT_DOOR].SetExtraWheelPositions( 1.0f, 1.0f, 1.0f, 1.0f );
RwObject* object = GetFirstObject( m_pCarNode[3] ); if ( m_pCarNode[3] != nullptr )
RpAtomicSetFlags( object, 0 ); {
RwObject* object = GetFirstObject( m_pCarNode[3] );
RpAtomicSetFlags( object, 0 );
}
object = GetFirstObject( m_pCarNode[6] ); if ( m_pCarNode[6] != nullptr )
RpAtomicSetFlags( object, 0 ); {
RwObject* object = GetFirstObject( m_pCarNode[6] );
RpAtomicSetFlags( object, 0 );
}
} }
} }