[Bf-blender-cvs] [0f217de4033] master: Fix T54927: BMesh Py error w/ select history slice

Campbell Barton noreply at git.blender.org
Thu May 3 20:24:31 CEST 2018


Commit: 0f217de4033f25d55e73d6aa8ab1020fed3f850c
Author: Campbell Barton
Date:   Thu May 3 20:23:32 2018 +0200
Branches: master
https://developer.blender.org/rB0f217de4033f25d55e73d6aa8ab1020fed3f850c

Fix T54927: BMesh Py error w/ select history slice

===================================================================

M	source/blender/python/bmesh/bmesh_py_types_select.c

===================================================================

diff --git a/source/blender/python/bmesh/bmesh_py_types_select.c b/source/blender/python/bmesh/bmesh_py_types_select.c
index b5a480c05b5..03d295c8ca1 100644
--- a/source/blender/python/bmesh/bmesh_py_types_select.c
+++ b/source/blender/python/bmesh/bmesh_py_types_select.c
@@ -245,14 +245,13 @@ static PyObject *bpy_bmeditselseq_subscript_slice(BPy_BMEditSelSeq *self, Py_ssi
 	}
 
 	/* add items until stop */
-	while ((ese = ese->next)) {
+	do {
 		PyList_APPEND(list, BPy_BMElem_CreatePyObject(self->bm, &ese->ele->head));
-
 		count++;
 		if (count == stop) {
 			break;
 		}
-	}
+	} while ((ese = ese->next));
 
 	return list;
 }



More information about the Bf-blender-cvs mailing list