diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-12-17 11:01:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-12-17 11:01:15 +0400 |
commit | f1a989f9c35d496842b2cfa44d90ee0019c06e22 (patch) | |
tree | 002c1f7a8f1c90c233d7d11f67959ad1f49ae125 /source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp | |
parent | 61fb34a622d5f05e551e0342c05df946bd11fcb1 (diff) |
Fix crash in freestyle vector parsing (hard to believe nobody noticed)
Vectors were being assigned as an array of classes in Vec2f_ptr_from_PyObject and similar functions,
rather then assigning a number to each axis.
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp index b08fcfa8dba..f36cbafa61a 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp @@ -315,7 +315,7 @@ static PyObject * StrokeAttribute_set_attribute_vec2(BPy_StrokeAttribute *self, if (!PyArg_ParseTupleAndKeywords(args, kwds, "sO", (char **)kwlist, &s, &obj)) return NULL; - if (!Vec2f_ptr_from_PyObject(obj, &vec)) { + if (!Vec2f_ptr_from_PyObject(obj, vec)) { PyErr_SetString(PyExc_TypeError, "argument 2 must be a 2D vector (either a list of 2 elements or Vector)"); return NULL; } @@ -344,7 +344,7 @@ static PyObject * StrokeAttribute_set_attribute_vec3(BPy_StrokeAttribute *self, if (!PyArg_ParseTupleAndKeywords(args, kwds, "sO", (char **)kwlist, &s, &obj)) return NULL; - if (!Vec3f_ptr_from_PyObject(obj, &vec)) { + if (!Vec3f_ptr_from_PyObject(obj, vec)) { PyErr_SetString(PyExc_TypeError, "argument 2 must be a 3D vector (either a list of 3 elements or Vector)"); return NULL; } |