minor refcounting issue

This commit is contained in:
David Rose 2012-06-22 00:30:12 +00:00
parent 61ceee2e73
commit 1bd2db3b20
2 changed files with 7 additions and 3 deletions

View File

@ -509,8 +509,12 @@ recompute_geom_node(const WorkingNodePath &np, LMatrix4 &rel_mat,
int num_geoms = node->get_num_geoms();
for (int i = 0; i < num_geoms; i++) {
Geom *geom = node->modify_geom(i);
recompute_geom(geom, rel_mat);
PT(Geom) geom = node->modify_geom(i);
distort_cat.debug()
<< " " << *node << " got geom " << geom
<< ", cache_ref = " << geom->get_cache_ref_count() << "\n";
geom->test_ref_count_integrity();
//recompute_geom(geom, rel_mat);
}
}

View File

@ -947,7 +947,7 @@ r_make_nonindexed(PandaNode *node, int nonindexed_bits) {
if ((nonindexed_bits & this_geom_bits) == 0) {
// The geom meets the user's qualifications for making
// nonindexed, so do it.
Geom *mgeom = DCAST(Geom, geom_node->modify_geom(i));
PT(Geom) mgeom = geom_node->modify_geom(i);
num_changed += mgeom->make_nonindexed((nonindexed_bits & MN_composite_only) != 0);
}
}