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.
This commit is contained in:
Campbell Barton
2013-12-17 18:01:15 +11:00
parent 61fb34a622
commit f1a989f9c3
6 changed files with 39 additions and 39 deletions

View File

@@ -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;
}