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:
authorCampbell Barton <ideasman42@gmail.com>2018-02-05 09:53:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-02-05 09:54:13 +0300
commitceb645bc564f836bda3d87981a3d03c2ffc1419c (patch)
tree71c60ac2d2b66b021572d95c12f80536c72201ee /source/blender/editors/util
parente84e8cb4972e74e1b869bf80f02615c2936e5b19 (diff)
Fix T53986: Crash saving during sculpt stroke
Also remove unused struct member.
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r--source/blender/editors/util/ed_util.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index 278b8e34311..c920c4524a1 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -168,7 +168,11 @@ bool ED_editors_flush_edits(const bContext *C, bool for_render)
* exiting we might not have a context for edit object and multiple sculpt
* objects can exist at the same time */
for (ob = bmain->object.first; ob; ob = ob->id.next) {
- if (ob->mode & OB_MODE_SCULPT) {
+ if ((ob->mode & OB_MODE_SCULPT) &&
+ /* Don't allow flushing while in the middle of a stroke (frees data in use).
+ * Auto-save prevents this from happening but scripts may cause a flush on saving: T53986. */
+ ((ob->sculpt && ob->sculpt->cache) == 0))
+ {
/* flush multires changes (for sculpt) */
multires_force_update(ob);
has_edited = true;