diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-10-26 16:39:25 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-10-26 16:39:25 +0300 |
commit | b937b6d06956327578e82a10f4136377758425aa (patch) | |
tree | 2583edd20a488a6aaa962381319aab3d7cf725ad /source | |
parent | 8de942b11d41485ab3dbf3ac0834d8eef12b5b4f (diff) |
Cleanup: silence address sanitizer warning about NULL + 0
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_attribute.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_attribute.c b/source/blender/makesrna/intern/rna_attribute.c index f1831bca0fe..dbf20896463 100644 --- a/source/blender/makesrna/intern/rna_attribute.c +++ b/source/blender/makesrna/intern/rna_attribute.c @@ -323,8 +323,10 @@ static void rna_AttributeGroup_next_domain(ID *id, int(skip)(CollectionPropertyIterator *iter, void *data)) { do { - CustomDataLayer *prev_layers = (CustomDataLayer *)iter->internal.array.endptr - - iter->internal.array.length; + CustomDataLayer *prev_layers = (iter->internal.array.endptr == NULL) ? + NULL : + (CustomDataLayer *)iter->internal.array.endptr - + iter->internal.array.length; CustomData *customdata = BKE_id_attributes_iterator_next_domain(id, prev_layers); if (customdata == NULL) { return; |