Timeline for EXC_BAD_ACCESS error when box2d joint is destroyed
Current License: CC BY-SA 3.0
2 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 29, 2012 at 17:25 | comment | added | colilo |
Thanks. DestroyJoint was being called several times since I didn't have a check for it. I tried the break, but it was giving the same error. I rather put a check and made the weldjoint null. Here's what I did: if (weldJoint == NULL) return; world->DestroyJoint(weldJoint); weldJoint = NULL; The issue with this is I am not able to create the weldjoint again. When the joint is destroyed I set a linear velocity to move the body towards another sprite to create another weldJoint. How can I solve this issue so I can create, destroy and recreate the weld joint unlimited times?
|
|
Aug 28, 2012 at 16:06 | history | answered | John | CC BY-SA 3.0 |