From c8db63162abe6473bbcbb909dbc7c337b8e76c68 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 26 Nov 2017 22:54:57 +0100 Subject: [PATCH] in PropertyGeometryList::setPyObject check for sequence instead of list --- src/Mod/Part/App/PropertyGeometryList.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mod/Part/App/PropertyGeometryList.cpp b/src/Mod/Part/App/PropertyGeometryList.cpp index c97fa094fc..5d66725d01 100644 --- a/src/Mod/Part/App/PropertyGeometryList.cpp +++ b/src/Mod/Part/App/PropertyGeometryList.cpp @@ -117,13 +117,13 @@ void PropertyGeometryList::setPyObject(PyObject *value) // check container of this property to notify about changes Part2DObject* part2d = dynamic_cast(this->getContainer()); - if (PyList_Check(value)) { - Py_ssize_t nSize = PyList_Size(value); + if (PySequence_Check(value)) { + Py_ssize_t nSize = PySequence_Size(value); std::vector values; values.resize(nSize); for (Py_ssize_t i=0; i < nSize; ++i) { - PyObject* item = PyList_GetItem(value, i); + PyObject* item = PySequence_GetItem(value, i); if (!PyObject_TypeCheck(item, &(GeometryPy::Type))) { std::string error = std::string("types in list must be 'Geometry', not "); error += item->ob_type->tp_name;