diff options
author | Stephen Swaney <sswaney@centurytel.net> | 2005-05-12 09:45:13 +0400 |
---|---|---|
committer | Stephen Swaney <sswaney@centurytel.net> | 2005-05-12 09:45:13 +0400 |
commit | 55cf304e995ff3e1ed69ff74bf09eee524189b0d (patch) | |
tree | 52a92988bcbb2a19ca4796d080eb309776be38ac /source/blender/python/api2_2x/Curve.c | |
parent | 516e21459c2735ef778f31ebd853f70893d33b2c (diff) |
bugfix: #2254 Curve.appendPoint() gives segfault in PySequence_Check().
Argument tuple not built correctly for CurNurb_appendPointToNurb().
Diffstat (limited to 'source/blender/python/api2_2x/Curve.c')
-rw-r--r-- | source/blender/python/api2_2x/Curve.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Curve.c b/source/blender/python/api2_2x/Curve.c index e4d91aca25e..70a4200383d 100644 --- a/source/blender/python/api2_2x/Curve.c +++ b/source/blender/python/api2_2x/Curve.c @@ -1152,6 +1152,8 @@ static PyObject *Curve_appendPoint( BPy_Curve * self, PyObject * args ) int i; int nurb_num; /* index of curve we append to */ PyObject *coord_args; /* coords for new point */ + PyObject *retval = NULL; + PyObject *valtuple; Nurb *nurb = self->curve->nurb.first; /* first nurb in Curve */ /* fixme - need to malloc new Nurb */ @@ -1175,8 +1177,13 @@ static PyObject *Curve_appendPoint( BPy_Curve * self, PyObject * args ) "curve index out of range" ) ); } - return CurNurb_appendPointToNurb( nurb, coord_args ); + /* rebuild our arg tuple for appendPointToNurb() */ + valtuple = Py_BuildValue( "(O)", coord_args ); + + retval = CurNurb_appendPointToNurb( nurb, valtuple ); + Py_DECREF( valtuple ); + return retval; } |