fix: double-free due to calling super-destructor
This commit is contained in:
parent
b10abd3800
commit
9b51d85056
|
@ -24,8 +24,8 @@ Part::Part(PartConstructParams params): Instance(&TYPE_), position(params.positi
|
|||
// This feels wrong. Get access to PhysicsWorld somehow else? Part will need access to this often though, most likely...
|
||||
extern rp::PhysicsWorld* world;
|
||||
Part::~Part() {
|
||||
world->destroyRigidBody(rigidBody);
|
||||
Instance::~Instance();
|
||||
if (this->rigidBody)
|
||||
world->destroyRigidBody(rigidBody);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue