diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-02-04 15:28:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-02-04 15:28:31 +0400 |
commit | 29a15f287f7f945e72967d1feef8584bef1c4141 (patch) | |
tree | b19568e990b75719dac33bbb0be60ea1f83124ed /source/blender/blenkernel | |
parent | e3784a27d6372858411ce257df6bff8984509702 (diff) |
fix [#34098] Crash after using Decimate or Remesh modifiers
converting a derived mesh to a mesh didnt clear its selection history, which could be invalid after applying a modifier.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 8ca6d045712..8e740075bc6 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -562,6 +562,13 @@ void DM_to_mesh(DerivedMesh *dm, Mesh *me, Object *ob) tmp.key = NULL; } + /* Clear selection history */ + tmp.mselect = NULL; + tmp.totselect = 0; + if (me->mselect) { + MEM_freeN(me->mselect); + } + *me = tmp; } |