From 83b2d267b5bb44be5ff710f81efd5c13de2a0488 Mon Sep 17 00:00:00 2001 From: Mika Saari Date: Thu, 29 Sep 2005 19:03:53 +0000 Subject: [PATCH] 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 --- source/blender/python/api2_2x/Text3d.c | 2 ++ 1 file changed, 2 insertions(+) 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 );