Browse Source

fix bam2egg

David Rose 16 years ago
parent
commit
515635f6da
1 changed files with 4 additions and 0 deletions
  1. 4 0
      pandatool/src/bam/bamToEgg.cxx

+ 4 - 0
pandatool/src/bam/bamToEgg.cxx

@@ -123,6 +123,10 @@ run() {
 
 
   while (object != (TypedWritable *)NULL || !bam_file.is_eof()) {
   while (object != (TypedWritable *)NULL || !bam_file.is_eof()) {
     if (object != (TypedWritable *)NULL) {
     if (object != (TypedWritable *)NULL) {
+      ReferenceCount *ref_ptr = object->as_reference_count();
+      if (ref_ptr != NULL) {
+        ref_ptr->ref();
+      }
       objects.push_back(object);
       objects.push_back(object);
     }
     }
     object = bam_file.read_object();
     object = bam_file.read_object();