diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2021-06-28 14:03:01 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-07-26 09:35:33 +0300 |
commit | 81e12cd9b1233014f18c527fbcea39ad6e9bb414 (patch) | |
tree | e01a8b09f2e765285a1030f7fe01067c91755017 /source | |
parent | d070cce77881c0f2c1bd7aa05fea4281a1cafce1 (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/customdata.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } } |