Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Thu, 3 May 2018 18:24:44 +0000 (20:24 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 3 May 2018 18:24:44 +0000 (20:24 +0200)
source/blender/python/bmesh/bmesh_py_types_select.c

index b5a480c05b582705b4e7828e5700baf32f0fad9d..03d295c8ca1e7d7355f3d01273fdcfdc73ecd309 100644 (file)
@@ -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;
 }