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:
authorTon Roosendaal <ton@blender.org>2004-11-08 22:58:04 +0300
committerTon Roosendaal <ton@blender.org>2004-11-08 22:58:04 +0300
commit4a20c3d03d72712b192b6e79d1b7827e41f4bd75 (patch)
tree55da517c143845367673137c9f86797e83fdcfdb /source/blender/python/api2_2x/NMesh.c
parentc20b7adec6e8792fbdfc7b008357cdc4799f2d99 (diff)
Nmesh module isn't edges aware yet; but can cause crashes replacing
existing ones that use edges (like when creases or fgons in use). Added proper free and NULL for it to prevent crashing, rest is for py team after release ;)
Diffstat (limited to 'source/blender/python/api2_2x/NMesh.c')
-rw-r--r--source/blender/python/api2_2x/NMesh.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/NMesh.c b/source/blender/python/api2_2x/NMesh.c
index f08882ebcc1..7862330f425 100644
--- a/source/blender/python/api2_2x/NMesh.c
+++ b/source/blender/python/api2_2x/NMesh.c
@@ -2064,6 +2064,8 @@ static int unlink_existingMeshData( Mesh * mesh )
EXPP_unlink_mesh( mesh );
if( mesh->mvert )
MEM_freeN( mesh->mvert );
+ if( mesh->medge )
+ MEM_freeN( mesh->medge );
if( mesh->mface )
MEM_freeN( mesh->mface );
if( mesh->mcol )
@@ -2171,6 +2173,7 @@ static int convert_NMeshToMesh( Mesh * mesh, BPy_NMesh * nmesh )
int i, j;
mesh->mvert = NULL;
+ mesh->medge = NULL;
mesh->mface = NULL;
mesh->mcol = NULL;
mesh->msticky = NULL;