Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-09-29 03:54:00 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-09-29 17:22:09 +0300
commit860854b07ffcac4fcdcdc479b88d4148a9f2a103 (patch)
treefdc897eafbc5c0cfd5b08bb69a11fb9bf8302a6c /source/blender/editors/sculpt_paint/sculpt.c
parent0fd3723b95b243938a4ba71da8a769aa4ebb1a20 (diff)
Fix (workaround) memory leak cancelling sculpt mask expand
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c5
1 files changed, 4 insertions, 1 deletions
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) ||