diff options
Diffstat (limited to 'source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp index 3e45ef17c1b..0329aa99acc 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp @@ -97,6 +97,10 @@ PyDoc_STRVAR(CurvePointIterator_object_doc, static PyObject *CurvePointIterator_object_get(BPy_CurvePointIterator *self, void *UNUSED(closure)) { + if (self->cp_it->isEnd()) { + PyErr_SetString(PyExc_RuntimeError, "iteration has stopped"); + return NULL; + } return BPy_CurvePoint_from_CurvePoint(self->cp_it->operator*()); } |