Browse Source

prevent bam loading crash

David Rose 18 years ago
parent
commit
5b3686b659
1 changed files with 4 additions and 2 deletions
  1. 4 2
      panda/src/char/characterJoint.cxx

+ 4 - 2
panda/src/char/characterJoint.cxx

@@ -572,11 +572,13 @@ complete_pointers(TypedWritable **p_list, BamReader* manager) {
 
 
   int i;
   int i;
   for (i = 0; i < _num_net_nodes; i++) {
   for (i = 0; i < _num_net_nodes; i++) {
-    add_net_transform(DCAST(PandaNode, p_list[pi++]));
+    PandaNode *node = DCAST(PandaNode, p_list[pi++]);
+    _net_transform_nodes.insert(node);
   }
   }
 
 
   for (i = 0; i < _num_local_nodes; i++) {
   for (i = 0; i < _num_local_nodes; i++) {
-    add_local_transform(DCAST(PandaNode, p_list[pi++]));
+    PandaNode *node = DCAST(PandaNode, p_list[pi++]);
+    _local_transform_nodes.insert(node);
   }
   }
 
 
   return pi;
   return pi;