From 704494e8cd970832482d550abdbdd6fb5079bb46 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 16 Jan 2015 14:31:51 +1100 Subject: Fix own error in freestyle api --- source/blender/freestyle/intern/python/BPy_ViewShape.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/blender/freestyle/intern/python/BPy_ViewShape.cpp') 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); } -- cgit v1.2.3