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:
Hans Goudey 2022-06-30 19:27:41 -05:00
parent 6161ce6e5d
commit 32e9c9802e
1 changed files with 1 additions and 0 deletions

View File

@ -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;