Cleanup: Add assert for customdata realloc size
This gives a more clear error than finding the error with the signed to unsigned conversion for size_t.
This commit is contained in:
parent
6161ce6e5d
commit
32e9c9802e
|
@ -2329,6 +2329,7 @@ bool CustomData_merge(const CustomData *source,
|
|||
|
||||
void CustomData_realloc(CustomData *data, int totelem)
|
||||
{
|
||||
BLI_assert(totelem > 0);
|
||||
for (int i = 0; i < data->totlayer; i++) {
|
||||
CustomDataLayer *layer = &data->layers[i];
|
||||
const LayerTypeInfo *typeInfo;
|
||||
|
|
Loading…
Reference in New Issue