Fix T89455: Cycles crash when rendering a Mesh with autosmooth
The crash was caused by a mistake in 5f9677fe0c
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.
This commit is contained in:
parent
1b942ef90c
commit
2dbb492268
Notes:
blender-bot
2023-02-14 07:31:32 +01:00
Referenced by issue #88449, Blender LTS: Maintenance Task 2.93 Referenced by issue #90423, Cycles - Render Pass contains black pixels with no values Referenced by issue #89455, Crash when using Cycles preview or render - custom data layer / auto smooth
|
@ -2817,7 +2817,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue