Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMika Saari <mika.saari@wipsl.com>2005-09-29 23:25:12 +0400
committerMika Saari <mika.saari@wipsl.com>2005-09-29 23:25:12 +0400
commita6bd07d10f57f0f5701b5a5e27fedf58cafac763 (patch)
tree82a1ea8017e60e08dc8cbfe225b8c2672487240b /source/blender/python/api2_2x/Text3d.c
parent83b2d267b5bb44be5ff710f81efd5c13de2a0488 (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.c3
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 );