Fix the crashing issue when closing Blocks3d

Physics engine now destroys JointsService on destructor
This commit is contained in:
NT_x86
2023-03-27 20:16:17 +03:00
parent f7a76511a8
commit 85e84bfdf3

View File

@@ -20,10 +20,11 @@ XplicitNgine::XplicitNgine()
XplicitNgine::~XplicitNgine()
{
dJointGroupDestroy (contactgroup);
dSpaceDestroy (physSpace);
dWorldDestroy (physWorld);
dCloseODE();
g_dataModel->getJointsService()->remove();
dJointGroupDestroy (contactgroup);
dSpaceDestroy (physSpace);
dWorldDestroy (physWorld);
dCloseODE();
}
void XplicitNgine::resetBody(PartInstance* partInstance)