diff options
author | Toni Alatalo <antont@kyperjokki.fi> | 2005-09-14 14:53:51 +0400 |
---|---|---|
committer | Toni Alatalo <antont@kyperjokki.fi> | 2005-09-14 14:53:51 +0400 |
commit | 290ae52d81f0d46a5f05f2613c641acf7877e689 (patch) | |
tree | 43516091ba63c23efee2d133601c8b1aea1f2e2f /source/blender/python/api2_2x/CurNurb.c | |
parent | 1b4f29353fa4c7b223b1c86244ec27ec69733a37 (diff) |
Memory management flag to behave better, as hinted by Ken Hughes.
Still not good, i.e. getting these when quitting: Error Totblock: 4
new bpytriple len: 60 0x8889bdc ... 'cause nothing frees them..
Changed the loop that parsed input args to PyArg_ParseTuple to have
support for passing ints from Python too as the floats that are the
coordinates. Didn't find PyInt_AsFloat and figured that this is an ok
way anyhow.
Changed the default handle mode from AUTO to ALIGN, which is the same
as in UI and more useful at least for me.
Little sanifying in CurNurb (this was done with Ton).
Diffstat (limited to 'source/blender/python/api2_2x/CurNurb.c')
-rw-r--r-- | source/blender/python/api2_2x/CurNurb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/CurNurb.c b/source/blender/python/api2_2x/CurNurb.c index 5a86b50fd8d..9704c343b27 100644 --- a/source/blender/python/api2_2x/CurNurb.c +++ b/source/blender/python/api2_2x/CurNurb.c @@ -498,9 +498,11 @@ PyObject *CurNurb_appendPointToNurb( Nurb * nurb, PyObject * args ) ( PyExc_MemoryError, "allocation failed" ) ); /* copy old points to new */ - memmove( nurb->bezt, tmp, sizeof( BezTriple ) * npoints ); - if( tmp ) + if( tmp ) { + memmove( nurb->bezt, tmp, sizeof( BezTriple ) * npoints ); MEM_freeN( tmp ); + } + nurb->pntsu++; /* add new point to end of list */ memcpy( nurb->bezt + npoints, |