Fix error freeing NULL if BArrayStore_AtSize is empty
Calling BLI_array_store_at_size_clear on an BArrayStore_AtSize which was not used would attempt to free a NULL pointer.
This commit is contained in:
parent
412c62f62e
commit
2bfe9b50c6
|
@ -54,8 +54,8 @@ void BLI_array_store_at_size_clear(struct BArrayStore_AtSize *bs_stride)
|
|||
}
|
||||
}
|
||||
|
||||
MEM_freeN(bs_stride->stride_table);
|
||||
bs_stride->stride_table = NULL;
|
||||
/* It's possible this table was never used. */
|
||||
MEM_SAFE_FREE(bs_stride->stride_table);
|
||||
bs_stride->stride_table_len = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue