forked from enlightenment/efl
ephysics - fix real access-after-free issue on delete of constraint
this fixes CID 1039895
This commit is contained in:
parent
1c267deb8f
commit
4d7edf623b
|
@ -403,10 +403,12 @@ ephysics_constraint_del(EPhysics_Constraint *constraint)
|
|||
return;
|
||||
}
|
||||
|
||||
ephysics_world_lock_take(constraint->world);
|
||||
// technically at this point locking and unlocking is pointless because
|
||||
// if another thread is accessing this constraint, after this point it
|
||||
// will be broken locks or not. this removes a segv in locking something
|
||||
// we freed in _ephysics_constraint_del() by not locking.
|
||||
_ephysics_constraint_del(constraint);
|
||||
INF("Constraint deleted.");
|
||||
ephysics_world_lock_release(constraint->world);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue