Fix T38962: Boolean modifier crashes when only right operand has UV layer
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 5 Mar 2014 08:29:02 +0000 (14:29 +0600)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 5 Mar 2014 08:29:02 +0000 (14:29 +0600)
source/blender/modifiers/intern/MOD_boolean_util.c

index 50ea8f18d3a9d72fd31c37623bf65b9ca7710f36..e0f8a18d54a6662f601034154d49fea8d7bd73d1 100644 (file)
@@ -351,6 +351,11 @@ static void exporter_InitGeomArrays(ExportMeshData *export_data,
        allocate_custom_layers(&dm->loopData, CD_MLOOPUV, num_loops,
                               CustomData_number_of_layers(&dm_left->loopData, CD_MLOOPUV));
 
+       allocate_custom_layers(&dm->loopData, CD_MLOOPCOL, num_loops,
+                              CustomData_number_of_layers(&dm_right->loopData, CD_MLOOPCOL));
+       allocate_custom_layers(&dm->loopData, CD_MLOOPUV, num_loops,
+                              CustomData_number_of_layers(&dm_right->loopData, CD_MLOOPUV));
+
        /* Merge custom data layers from operands.
         *
         * Will only create custom data layers for all the layers which appears in