diff options
author | Mika Saari <mika.saari@wipsl.com> | 2005-09-29 23:25:12 +0400 |
---|---|---|
committer | Mika Saari <mika.saari@wipsl.com> | 2005-09-29 23:25:12 +0400 |
commit | a6bd07d10f57f0f5701b5a5e27fedf58cafac763 (patch) | |
tree | 82a1ea8017e60e08dc8cbfe225b8c2672487240b /source/blender/python/api2_2x/Text3d.c | |
parent | 83b2d267b5bb44be5ff710f81efd5c13de2a0488 (diff) |
Text3d.c NULL pointer check added to get rid of MEM_freeN warning.
Diffstat (limited to 'source/blender/python/api2_2x/Text3d.c')
-rw-r--r-- | source/blender/python/api2_2x/Text3d.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Text3d.c b/source/blender/python/api2_2x/Text3d.c index c1d2966d2aa..504ca9252c3 100644 --- a/source/blender/python/api2_2x/Text3d.c +++ b/source/blender/python/api2_2x/Text3d.c @@ -491,7 +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); + if(self->curve->strinfo != NULL) + 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 ); |