Browse Source

*** empty log message ***

David Rose 25 years ago
parent
commit
b1f0805d02
1 changed files with 2 additions and 1 deletions
  1. 2 1
      panda/src/egg/eggGroupNode.cxx

+ 2 - 1
panda/src/egg/eggGroupNode.cxx

@@ -604,8 +604,9 @@ remove_invalid_primitives() {
 
 
     if (child->is_of_type(EggPrimitive::get_class_type())) {
     if (child->is_of_type(EggPrimitive::get_class_type())) {
       EggPrimitive *prim = DCAST(EggPrimitive, child);
       EggPrimitive *prim = DCAST(EggPrimitive, child);
-      if (prim->cleanup()) {
+      if (!prim->cleanup()) {
 	_children.erase(ci);
 	_children.erase(ci);
+	num_removed++;
       }
       }
     
     
     } else if (child->is_of_type(EggGroupNode::get_class_type())) {
     } else if (child->is_of_type(EggGroupNode::get_class_type())) {