We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60ea72c commit 4f36327Copy full SHA for 4f36327
vphysics_jolt/vjolt_environment.cpp
@@ -585,8 +585,11 @@ void JoltPhysicsSpring::OnJoltPhysicsObjectDestroyed( JoltPhysicsObject *pObject
585
586
// Raphael: As soon as one of the physics objects / bodies get destroyed,
587
// we need to remove the constraint or else it will crash on the next simulation.
588
- m_pPhysicsSystem->RemoveConstraint( m_pConstraint );
589
- m_pConstraint = nullptr;
+ if ( m_pConstraint )
+ {
590
+ m_pPhysicsSystem->RemoveConstraint( m_pConstraint );
591
+ m_pConstraint = nullptr;
592
+ }
593
}
594
595
//-------------------------------------------------------------------------------------------------
0 commit comments