Fix bug #1466: Crash on decimating non-manifold mesh in scons build.
- Enabled the NDEBUG define (to disable assertions) on all platforms in scons. This is already the default in Makefiles. - Free MEdge data after decimating, it is not valid anymore.
This commit is contained in:
parent
86d0d50479
commit
5881af9306
@ -264,7 +264,7 @@ elif sys.platform == 'cygwin':
|
||||
debug_flags = ['-O2', '-g']
|
||||
extra_flags = ['-pipe', '-mno-cygwin', '-mwindows', '-funsigned-char']
|
||||
cxxflags = []
|
||||
defines = ['FREE_WINDOWS', 'NDEBUG']
|
||||
defines = ['FREE_WINDOWS']
|
||||
warn_flags = ['-Wall', '-Wno-char-subscripts']
|
||||
platform_libs = ['png', 'jpeg', 'netapi32',
|
||||
'opengl32', 'glu32', 'winmm',
|
||||
@ -900,8 +900,7 @@ else:
|
||||
|
||||
if user_options_dict['BUILD_BINARY'] == 'release':
|
||||
cflags = extra_flags + release_flags + warn_flags
|
||||
if sys.platform == 'win32':
|
||||
defines += ['NDEBUG']
|
||||
defines += ['NDEBUG']
|
||||
else:
|
||||
cflags = extra_flags + debug_flags + warn_flags
|
||||
if sys.platform == 'win32':
|
||||
@ -1671,4 +1670,4 @@ if enable_clean == 0: # only set up dependencies when not cleaning
|
||||
if user_options_dict['BUILD_BLENDER_PLAYER'] == 1:
|
||||
env.Depends(default_target, playername)
|
||||
env.Depends(default_target, appname)
|
||||
|
||||
|
||||
|
@ -207,8 +207,8 @@ static void decimate_faces(void)
|
||||
me= ob->data;
|
||||
|
||||
/* add warning for vertex col and tfaces */
|
||||
if(me->tface || me->mcol || me->dvert) {
|
||||
if(okee("This will remove UV coordinates, vertexcolors, and deform weights")==0) return;
|
||||
if(me->tface || me->mcol || me->dvert || me->medge) {
|
||||
if(okee("This will remove UV coordinates, vertexcolors, deform weights and edge data")==0) return;
|
||||
if(me->tface) MEM_freeN(me->tface);
|
||||
if(me->mcol) MEM_freeN(me->mcol);
|
||||
if(me->dvert) free_dverts(me->dvert, me->totvert);
|
||||
@ -348,6 +348,11 @@ static void decimate_apply(void)
|
||||
dlm->mvert= NULL;
|
||||
me->totvert= dlm->totvert;
|
||||
|
||||
// edges
|
||||
if(me->medge) MEM_freeN(me->medge);
|
||||
me->medge = NULL;
|
||||
me->totedge = 0;
|
||||
|
||||
// faces
|
||||
if(me->mface) MEM_freeN(me->mface);
|
||||
me->mface= MEM_callocN(dlm->totface*sizeof(MFace), "mface");
|
||||
|
Loading…
Reference in New Issue
Block a user