mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-19 05:06:25 -04:00
bug reassigning a new handler to an old CollisionNode
This commit is contained in:
parent
73dfaaf6ca
commit
ce302d87d7
@ -82,10 +82,10 @@ add_collider(CollisionNode *node, CollisionHandler *handler) {
|
|||||||
// We already knew about this collider.
|
// We already knew about this collider.
|
||||||
if ((*ci).second != handler) {
|
if ((*ci).second != handler) {
|
||||||
// Change the handler.
|
// Change the handler.
|
||||||
|
PT(CollisionHandler) old_handler = (*ci).second;
|
||||||
(*ci).second = handler;
|
(*ci).second = handler;
|
||||||
|
|
||||||
// Now update our own reference counts within our handler set.
|
// Now update our own reference counts within our handler set.
|
||||||
CollisionHandler *old_handler = (*ci).second;
|
|
||||||
Handlers::iterator hi = _handlers.find(old_handler);
|
Handlers::iterator hi = _handlers.find(old_handler);
|
||||||
nassertv(hi != _handlers.end());
|
nassertv(hi != _handlers.end());
|
||||||
(*hi).second--;
|
(*hi).second--;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user