Alembic export: only free duplilists when not NULL
authorSybren A. Stüvel <sybren@stuvel.eu>
Wed, 6 Jun 2018 13:42:20 +0000 (15:42 +0200)
committerSybren A. Stüvel <sybren@stuvel.eu>
Wed, 6 Jun 2018 13:54:03 +0000 (15:54 +0200)
source/blender/alembic/intern/abc_exporter.cc

index 2e882a4..67575cb 100644 (file)
@@ -410,9 +410,9 @@ void AbcExporter::exploreTransform(EvaluationContext *eval_ctx, Object *ob, Obje
                                exploreTransform(eval_ctx, dupli_ob, dupli_parent, ob);
                        }
                }
-       }
 
-       free_object_duplilist(lb);
+               free_object_duplilist(lb);
+       }
 }
 
 AbcTransformWriter * AbcExporter::createTransformWriter(Object *ob, Object *parent, Object *dupliObParent)
@@ -521,9 +521,9 @@ void AbcExporter::exploreObject(EvaluationContext *eval_ctx, Object *ob, Object
                                exploreObject(eval_ctx, link->ob, ob);
                        }
                }
-       }
 
-       free_object_duplilist(lb);
+               free_object_duplilist(lb);
+       }
 }
 
 void AbcExporter::createParticleSystemsWriters(Object *ob, AbcTransformWriter *xform)