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.
This commit is contained in:
parent
b2d32d7fa4
commit
9abc2dfa49
Notes:
blender-bot
2023-02-14 06:21:59 +01:00
Referenced by issue #56610, Crash when saving a Blender Image in a Python script Referenced by issue #56491, Crash due to (preview) jobs running during undo step.
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue