From 2ded3768ace30beb98b67e28b4cf44b155b6cacc Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 5 Jul 2007 18:36:57 +0000 Subject: [PATCH] fix assertion failure with merge_bundles --- panda/src/chan/partBundle.h | 1 + panda/src/char/character.cxx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/panda/src/chan/partBundle.h b/panda/src/chan/partBundle.h index 7fd5defd1b..1a5dcd0c8a 100644 --- a/panda/src/chan/partBundle.h +++ b/panda/src/chan/partBundle.h @@ -205,6 +205,7 @@ private: static TypeHandle _type_handle; friend class PartBundleNode; + friend class Character; friend class MovingPartBase; friend class MovingPartMatrix; friend class MovingPartScalar; diff --git a/panda/src/char/character.cxx b/panda/src/char/character.cxx index dfcd84cad8..3e3e275f31 100644 --- a/panda/src/char/character.cxx +++ b/panda/src/char/character.cxx @@ -265,7 +265,9 @@ merge_bundles(PartBundle *old_bundle, PartBundle *new_bundle) { // First, merge the bundles themselves. JointMap joint_map; r_merge_bundles(joint_map, old_bundle, new_bundle); + old_bundle->remove_node(this); _bundles[index] = new_bundle; + new_bundle->add_node(this); // Now convert the geometry to use the new bundle. GeomVertexMap gvmap;