Undoing masks in dyntopo leaked memory

This commit is contained in:
Antonis Ryakiotakis 2014-04-02 18:25:03 +03:00
parent 965e5039f5
commit 6785e45951
1 changed files with 3 additions and 0 deletions

View File

@ -296,6 +296,9 @@ static void sculpt_undo_bmesh_restore_generic(bContext *C,
for (i = 0; i < totnode; i++) {
BKE_pbvh_node_mark_redraw(nodes[i]);
}
if (nodes)
MEM_freeN(nodes);
}
else {
/* A bit lame, but for now just recreate the PBVH. The alternative