diff options
Diffstat (limited to 'source/blender/python/api2_2x/Text3d.c')
-rw-r--r-- | source/blender/python/api2_2x/Text3d.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/python/api2_2x/Text3d.c b/source/blender/python/api2_2x/Text3d.c index e9a957648fe..1f717281117 100644 --- a/source/blender/python/api2_2x/Text3d.c +++ b/source/blender/python/api2_2x/Text3d.c @@ -491,11 +491,12 @@ static PyObject *Text3d_setText( BPy_Text3d * self, PyObject * args ) if( !PyArg_ParseTuple( args, "s", &text ) ) return ( EXPP_ReturnPyObjError( PyExc_AttributeError, "expected string argument" ) ); - if (self) { - MEM_freeN (self->curve->str); - self->curve->str= MEM_mallocN (strlen (text)+1, "str"); - strcpy (self->curve->str, text); - self->curve->pos= strlen (text); + if( self ) { + MEM_freeN( self->curve->str ); + self->curve->str = MEM_mallocN( strlen (text)+1, "str" ); + strcpy( self->curve->str, text ); + self->curve->pos = strlen ( text ); + self->curve->len = strlen ( text ); } Py_INCREF( Py_None ); return Py_None; |