diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-01-16 06:31:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-01-19 03:31:23 +0300 |
commit | 704494e8cd970832482d550abdbdd6fb5079bb46 (patch) | |
tree | a8829b4813e6e9255932a0b0da8806d969ac4473 /source/blender/freestyle/intern/python/BPy_ViewShape.cpp | |
parent | ffe56536f1050717b133883cba29d63fff8d9e00 (diff) |
Fix own error in freestyle api
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_ViewShape.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/BPy_ViewShape.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp index 6c6e821a1e4..8aaddbe6347 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp @@ -220,7 +220,6 @@ static PyObject *ViewShape_vertices_get(BPy_ViewShape *self, void *UNUSED(closur static int ViewShape_vertices_set(BPy_ViewShape *self, PyObject *value, void *UNUSED(closure)) { - PyObject *list = 0; PyObject *item; vector< ViewVertex *> v; @@ -229,9 +228,9 @@ static int ViewShape_vertices_set(BPy_ViewShape *self, PyObject *value, void *UN return -1; } - v.reserve(PyList_Size(list)); - for (unsigned int i = 0; i < PyList_Size(list); i++) { - item = PyList_GET_ITEM(list, i); + v.reserve(PyList_Size(value)); + for (unsigned int i = 0; i < PyList_Size(value); i++) { + item = PyList_GET_ITEM(value, i); if (BPy_ViewVertex_Check(item)) { v.push_back(((BPy_ViewVertex *)item)->vv); } |