fix [#24921] Crash after inserting keyframing UV coords and changing frame in edit...
[blender.git] / source / blender / makesrna / intern / rna_access.c
index 1cac7aefdfa9c9e6d525293d1ac62c428cd7b7e0..db8710aec2ad31efcaddac6956b617b4ebd5f6c8 100644 (file)
@@ -2794,6 +2794,10 @@ void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int i
 
        if(ptr == NULL)
                length= 0;
+       else if (length == 0) {
+               ptr= NULL;
+               itemsize= 0;
+       }
 
        internal= MEM_callocN(sizeof(ArrayIterator), "ArrayIterator");
        internal->ptr= ptr;