Fix memory leak switching sculpt mode + dyntopo
Auto-enabling dyntopo w/ mode switching leaked memory when undo was used.
This commit is contained in:
parent
003365df0e
commit
fd43b7077f
|
@ -5462,7 +5462,10 @@ static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op)
|
|||
}
|
||||
|
||||
if (message_unsupported == NULL) {
|
||||
/* undo push is needed to prevent memory leak */
|
||||
sculpt_undo_push_begin("Dynamic topology enable");
|
||||
sculpt_dynamic_topology_enable(C);
|
||||
sculpt_undo_push_node(ob, NULL, SCULPT_UNDO_DYNTOPO_BEGIN);
|
||||
}
|
||||
else {
|
||||
BKE_reportf(op->reports, RPT_WARNING,
|
||||
|
|
Loading…
Reference in New Issue