diff options
author | Mika Saari <mika.saari@wipsl.com> | 2005-09-29 23:03:53 +0400 |
---|---|---|
committer | Mika Saari <mika.saari@wipsl.com> | 2005-09-29 23:03:53 +0400 |
commit | 83b2d267b5bb44be5ff710f81efd5c13de2a0488 (patch) | |
tree | 6e1d7bcfdf5ca750f1656db3e03b85979e13b852 /source/blender/python/api2_2x/Text3d.c | |
parent | fa57f3115d08ee12e31283be990217c27dae631d (diff) |
cu->strinfo reallocation added to Text3d.c, so when setText is executed
the strinfo is reallocated to include strlen(cu->str) amount of free memory
Diffstat (limited to 'source/blender/python/api2_2x/Text3d.c')
-rw-r--r-- | source/blender/python/api2_2x/Text3d.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Text3d.c b/source/blender/python/api2_2x/Text3d.c index 5e7ccd43f75..c1d2966d2aa 100644 --- a/source/blender/python/api2_2x/Text3d.c +++ b/source/blender/python/api2_2x/Text3d.c @@ -491,6 +491,8 @@ static PyObject *Text3d_setText( BPy_Text3d * self, PyObject * args ) "expected string argument" ) ); if( self ) { MEM_freeN( self->curve->str ); + MEM_freeN(self->curve->strinfo); + self->curve->strinfo = MEM_callocN((strlen(text)+1)*sizeof(CharInfo), "strinfo"); self->curve->str = MEM_mallocN( strlen (text)+1, "str" ); strcpy( self->curve->str, text ); self->curve->pos = (short)strlen ( text ); |