Fix 30401: Python API vert new((0,0,0)) crashes.
Thanks to Campbell for fix, adding an & to an arg. Also needed to negate the sense of a later test.
This commit is contained in:
@@ -1213,7 +1213,7 @@ static PyObject *bpy_bmvertseq_new(BPy_BMElemSeq *self, PyObject *args)
|
|||||||
BPY_BM_CHECK_OBJ(self);
|
BPY_BM_CHECK_OBJ(self);
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "|OO!:verts.new",
|
if (!PyArg_ParseTuple(args, "|OO!:verts.new",
|
||||||
py_co,
|
&py_co,
|
||||||
&BPy_BMVert_Type, &py_vert_example))
|
&BPy_BMVert_Type, &py_vert_example))
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -1227,7 +1227,7 @@ static PyObject *bpy_bmvertseq_new(BPy_BMElemSeq *self, PyObject *args)
|
|||||||
BPY_BM_CHECK_OBJ(py_vert_example);
|
BPY_BM_CHECK_OBJ(py_vert_example);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (py_co && mathutils_array_parse(co, 3, 3, py_co, "verts.new(co)") != -1) {
|
if (!py_co || mathutils_array_parse(co, 3, 3, py_co, "verts.new(co)") == -1) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user