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.
This commit is contained in:
Campbell Barton 2013-02-04 11:28:31 +00:00
parent e3784a27d6
commit 29a15f287f

@ -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;
}