Skip to content
Snippets Groups Projects
Commit 4a20c3d0 authored by Ton Roosendaal's avatar Ton Roosendaal
Browse files

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 ;)
parent c20b7ade
No related branches found
No related tags found
No related merge requests found
...@@ -2064,6 +2064,8 @@ static int unlink_existingMeshData( Mesh * mesh ) ...@@ -2064,6 +2064,8 @@ static int unlink_existingMeshData( Mesh * mesh )
EXPP_unlink_mesh( mesh ); EXPP_unlink_mesh( mesh );
if( mesh->mvert ) if( mesh->mvert )
MEM_freeN( mesh->mvert ); MEM_freeN( mesh->mvert );
if( mesh->medge )
MEM_freeN( mesh->medge );
if( mesh->mface ) if( mesh->mface )
MEM_freeN( mesh->mface ); MEM_freeN( mesh->mface );
if( mesh->mcol ) if( mesh->mcol )
...@@ -2171,6 +2173,7 @@ static int convert_NMeshToMesh( Mesh * mesh, BPy_NMesh * nmesh ) ...@@ -2171,6 +2173,7 @@ static int convert_NMeshToMesh( Mesh * mesh, BPy_NMesh * nmesh )
int i, j; int i, j;
mesh->mvert = NULL; mesh->mvert = NULL;
mesh->medge = NULL;
mesh->mface = NULL; mesh->mface = NULL;
mesh->mcol = NULL; mesh->mcol = NULL;
mesh->msticky = NULL; mesh->msticky = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment