[Bf-blender-cvs] [860854b07ff] master: Fix (workaround) memory leak cancelling sculpt mask expand
Brecht Van Lommel
noreply at git.blender.org
Sun Sep 29 16:24:21 CEST 2019
Commit: 860854b07ffcac4fcdcdc479b88d4148a9f2a103
Author: Brecht Van Lommel
Date: Sun Sep 29 02:54:00 2019 +0200
Branches: master
https://developer.blender.org/rB860854b07ffcac4fcdcdc479b88d4148a9f2a103
Fix (workaround) memory leak cancelling sculpt mask expand
===================================================================
M source/blender/editors/sculpt_paint/sculpt.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 39d182d60de..493b6925b4c 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -8919,8 +8919,11 @@ static int sculpt_mask_expand_modal(bContext *C, wmOperator *op, const wmEvent *
if ((event->type == ESCKEY && event->val == KM_PRESS) ||
(event->type == RIGHTMOUSE && event->val == KM_PRESS)) {
+ /* Returning OPERATOR_CANCELLED will leak memory due to not finishing
+ * undo. Better solution could be to make paint_mesh_restore_co work
+ * for this case. */
sculpt_mask_expand_cancel(C, op);
- return OPERATOR_CANCELLED;
+ return OPERATOR_FINISHED;
}
if ((event->type == LEFTMOUSE && event->val == KM_RELEASE) ||
More information about the Bf-blender-cvs
mailing list