Fixed some crashes.
For some reason, it crashes at these points. There should be a reason for it but idk. There also should be a better way to solve this.
This commit is contained in:
parent
50cef39716
commit
813dbf7438
|
@ -688,7 +688,7 @@ void JoltPhysicsEnvironment::DestroyShadowController( IPhysicsShadowController *
|
|||
{
|
||||
JoltPhysicsShadowController *pController = static_cast< JoltPhysicsShadowController * >( pShadowController );
|
||||
Erase( m_pPhysicsControllers, pController );
|
||||
delete pController;
|
||||
//delete pController;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
@ -704,7 +704,7 @@ void JoltPhysicsEnvironment::DestroyPlayerController( IPhysicsPlayerController *
|
|||
{
|
||||
JoltPhysicsPlayerController *pController = static_cast< JoltPhysicsPlayerController * >( pPlayerController );
|
||||
Erase( m_pPhysicsControllers, pController );
|
||||
delete pController;
|
||||
//delete pController;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
@ -720,7 +720,7 @@ void JoltPhysicsEnvironment::DestroyMotionController( IPhysicsMotionController *
|
|||
{
|
||||
JoltPhysicsMotionController *pJoltController = static_cast< JoltPhysicsMotionController * >( pController );
|
||||
Erase( m_pPhysicsControllers, pJoltController );
|
||||
delete pJoltController;
|
||||
//delete pJoltController;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
@ -738,7 +738,7 @@ void JoltPhysicsEnvironment::DestroyVehicleController( IPhysicsVehicleController
|
|||
{
|
||||
JoltPhysicsVehicleController *pJoltController = static_cast<JoltPhysicsVehicleController *>( pVehicleController );
|
||||
Erase( m_pPhysicsControllers, pJoltController );
|
||||
delete pJoltController;
|
||||
//delete pJoltController;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -106,7 +106,7 @@ InitReturnVal_t JoltPhysicsInterface::Init()
|
|||
|
||||
void JoltPhysicsInterface::Shutdown()
|
||||
{
|
||||
delete m_pJobSystem;
|
||||
//delete m_pJobSystem;
|
||||
delete m_pTempAllocator;
|
||||
delete JPH::Factory::sInstance;
|
||||
|
||||
|
@ -128,7 +128,7 @@ IPhysicsEnvironment *JoltPhysicsInterface::CreateEnvironment()
|
|||
|
||||
void JoltPhysicsInterface::DestroyEnvironment( IPhysicsEnvironment *pEnvironment )
|
||||
{
|
||||
delete static_cast<JoltPhysicsEnvironment *>( pEnvironment );
|
||||
//delete static_cast<JoltPhysicsEnvironment *>( pEnvironment );
|
||||
}
|
||||
|
||||
IPhysicsEnvironment *JoltPhysicsInterface::GetActiveEnvironmentByIndex( int index )
|
||||
|
|
Loading…
Reference in New Issue