Browse Source

fix minor bugs

David Rose 17 years ago
parent
commit
f3ec66d694
2 changed files with 2 additions and 1 deletions
  1. 1 0
      panda/src/pgraph/cullableObject.cxx
  2. 1 1
      panda/src/pgraph/geomTransformer.cxx

+ 1 - 0
panda/src/pgraph/cullableObject.cxx

@@ -61,6 +61,7 @@ bool CullableObject::
 munge_geom(GraphicsStateGuardianBase *gsg,
            GeomMunger *munger, const CullTraverser *traverser,
            bool force) {
+  nassertr(munger != (GeomMunger *)NULL, false);
   Thread *current_thread = traverser->get_current_thread();
   PStatTimer timer(_munge_geom_pcollector, current_thread);
   if (_geom != (Geom *)NULL) {

+ 1 - 1
panda/src/pgraph/geomTransformer.cxx

@@ -906,7 +906,7 @@ premunge_geom(const Geom *geom, GeomMunger *munger) {
   CPT(Geom) pgeom = geom;
   munger->premunge_geom(pgeom, vdata);
 
-  PT(Geom) geom_copy = geom->make_copy();
+  PT(Geom) geom_copy = pgeom->make_copy();
   geom_copy->set_vertex_data(vdata);
 
   return geom_copy;