forked from bartvdbraak/blender
Assert for invalid customdata allocs
This commit is contained in:
parent
ca2b4323a8
commit
21cb628399
@ -1649,6 +1649,8 @@ static CustomDataLayer *customData_add_layer__internal(CustomData *data, int typ
|
||||
(alloctype == CD_DUPLICATE) ||
|
||||
(alloctype == CD_REFERENCE));
|
||||
|
||||
BLI_assert(size >= 0);
|
||||
|
||||
if (!typeInfo->defaultname && CustomData_has_layer(data, type))
|
||||
return &data->layers[CustomData_get_layer_index(data, type)];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user