diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-22 17:15:29 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-22 17:15:29 +0400 |
commit | f5f529e74091b2c8d383504db4a2fea2c0279959 (patch) | |
tree | 71137e94952c1614bcb1fa4f5749b960e36260c0 /source | |
parent | 4ed01fe734e513e6aec6f96140203ff7d4d61cac (diff) |
Fix freeing of NULL pointer in array modifier.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/modifiers/intern/MOD_mirror.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c index 67e723eb1f9..6552ff38645 100644 --- a/source/blender/modifiers/intern/MOD_mirror.c +++ b/source/blender/modifiers/intern/MOD_mirror.c @@ -271,11 +271,13 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, flip_map= defgroup_flip_map(ob, &flip_map_len, FALSE); - for (i = maxVerts; i-- > 0; dvert++) { - defvert_flip(dvert, flip_map, flip_map_len); - } + if (flip_map) { + for (i = maxVerts; i-- > 0; dvert++) { + defvert_flip(dvert, flip_map, flip_map_len); + } - MEM_freeN(flip_map); + MEM_freeN(flip_map); + } } if (do_vtargetmap) { |