Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp')
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
index d493b6c158b..ccf52c64757 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
@@ -115,6 +115,10 @@ PyDoc_STRVAR(SVertexIterator_object_doc,
static PyObject *SVertexIterator_object_get(BPy_SVertexIterator *self, void *UNUSED(closure))
{
+ if (self->sv_it->isEnd()) {
+ PyErr_SetString(PyExc_RuntimeError, "iteration has stopped");
+ return NULL;
+ }
SVertex *sv = self->sv_it->operator->();
if (sv)
return BPy_SVertex_from_SVertex(*sv);