fix T60092 collada exporter: exporting a rig with one single bone fails
authorGaia Clary <gaia.clary@machinimatrix.org>
Sat, 5 Jan 2019 17:03:49 +0000 (18:03 +0100)
committerGaia Clary <gaia.clary@machinimatrix.org>
Sat, 5 Jan 2019 17:08:10 +0000 (18:08 +0100)
The problem was that removing entries from a vetor while iterating
the vector was implemented badly. This caused the failure when only
one element was in vector.

source/blender/collada/ArmatureExporter.cpp

index 055ffc3..fea6563 100644 (file)
@@ -233,7 +233,7 @@ void ArmatureExporter::add_bone_node(
 
                                        se->writeNodes(*i);
                                        copy_m4_m4((*i)->parentinv, backup_parinv);
-                                       child_objects.erase(i++);
+                                       i = child_objects.erase(i);
                                }
                                else i++;
                        }