diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-08-10 00:00:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-08-10 00:00:53 +0400 |
commit | 4262bd2906dca0c7c8a3eec189e0abd817df6b01 (patch) | |
tree | 4d4f7b72294afe8027e00d7a2dcc3e65e50df6b6 /source/blender/python/intern/bpy_rna_array.c | |
parent | 0207d9ce275c7206fcf3abf9ba056ca18e0f3a87 (diff) |
fix [#28196] Unwrap tris in lightmap pack
Diffstat (limited to 'source/blender/python/intern/bpy_rna_array.c')
-rw-r--r-- | source/blender/python/intern/bpy_rna_array.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_rna_array.c b/source/blender/python/intern/bpy_rna_array.c index 9843a57e0f2..e50ce233671 100644 --- a/source/blender/python/intern/bpy_rna_array.c +++ b/source/blender/python/intern/bpy_rna_array.c @@ -285,17 +285,20 @@ static char *copy_values(PyObject *seq, PointerRNA *ptr, PropertyRNA *prop, int int totdim= RNA_property_array_dimension(ptr, prop, NULL); const int seq_size= PySequence_Size(seq); - /* General note for 'data' being NULL or PySequence_GetItem() failing. + /* Regarding PySequence_GetItem() failing. * * This should never be NULL since we validated it, _but_ some triky python * developer could write their own sequence type which succeeds on - * validating but fails later somehow, so include checks for safety. */ + * validating but fails later somehow, so include checks for safety. + */ + + /* Note that 'data can be NULL' */ if(seq_size == -1) { return NULL; } - for (i= 0; (i < seq_size) && data; i++) { + for (i= 0; i < seq_size; i++) { PyObject *item= PySequence_GetItem(seq, i); if(item) { if (dim + 1 < totdim) { |