[Bf-blender-cvs] [9abc2dfa493] master: Fix T56491: Undo crash while preview jobs run
Campbell Barton
noreply at git.blender.org
Fri Aug 24 04:33:12 CEST 2018
Commit: 9abc2dfa4933266b7f385b75c65527d512441363
Author: Campbell Barton
Date: Fri Aug 24 12:36:19 2018 +1000
Branches: master
https://developer.blender.org/rB9abc2dfa4933266b7f385b75c65527d512441363
Fix T56491: Undo crash while preview jobs run
While the crash is in 2.8, it's possible undo operates on data
which isn't only owned by the current scene (any object for eg).
Thanks to @mont29 for suggesting the fix.
===================================================================
M source/blender/editors/undo/ed_undo.c
===================================================================
diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c
index a13fa4af4e2..621c5d73d5a 100644
--- a/source/blender/editors/undo/ed_undo.c
+++ b/source/blender/editors/undo/ed_undo.c
@@ -111,9 +111,7 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
/* undo during jobs are running can easily lead to freeing data using by jobs,
* or they can just lead to freezing job in some other cases */
- if (WM_jobs_test(wm, scene, WM_JOB_TYPE_ANY)) {
- return OPERATOR_CANCELLED;
- }
+ WM_jobs_kill_all(wm);
/* TODO(campbell): undo_system: use undo system */
/* grease pencil can be can be used in plenty of spaces, so check it first */
More information about the Bf-blender-cvs
mailing list