mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-18 12:43:44 -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.
|
||||
if ((*ci).second != handler) {
|
||||
// Change the handler.
|
||||
PT(CollisionHandler) old_handler = (*ci).second;
|
||||
(*ci).second = handler;
|
||||
|
||||
// Now update our own reference counts within our handler set.
|
||||
CollisionHandler *old_handler = (*ci).second;
|
||||
Handlers::iterator hi = _handlers.find(old_handler);
|
||||
nassertv(hi != _handlers.end());
|
||||
(*hi).second--;
|
||||
|
Loading…
x
Reference in New Issue
Block a user