[Bf-blender-cvs] [81e12cd9b12] blender-v2.93-release: Fix T89455: Cycles crash when rendering a Mesh with autosmooth

Kévin Dietrich noreply at git.blender.org
Mon Jul 26 08:52:30 CEST 2021


Commit: 81e12cd9b1233014f18c527fbcea39ad6e9bb414
Author: Kévin Dietrich
Date:   Mon Jun 28 13:03:01 2021 +0200
Branches: blender-v2.93-release
https://developer.blender.org/rB81e12cd9b1233014f18c527fbcea39ad6e9bb414

Fix T89455: Cycles crash when rendering a Mesh with autosmooth

The crash was caused by a mistake in 5f9677fe0c533b008b815d7fee0b56509a414ab7
where the pointers to the custom data layers would be overwritten with the one
for the first layer, as CustomData_duplicate_referenced_layer is only about the
first layer. customData_duplicate_referenced_layer_index should be used instead
to duplicate the right layer.

===================================================================

M	source/blender/blenkernel/intern/customdata.c

===================================================================

diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 458d9fb4861..c1dbd2f4b97 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -2819,7 +2819,7 @@ void CustomData_duplicate_referenced_layers(CustomData *data, int totelem)
 {
   for (int i = 0; i < data->totlayer; i++) {
     CustomDataLayer *layer = &data->layers[i];
-    layer->data = CustomData_duplicate_referenced_layer(data, layer->type, totelem);
+    layer->data = customData_duplicate_referenced_layer_index(data, i, totelem);
   }
 }



More information about the Bf-blender-cvs mailing list