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:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-11-29 19:26:46 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-11-29 19:26:46 +0400
commit9c0f557b35acf26fdc95dc118dbf29f91731d2c2 (patch)
treebf76246b739044cb9a3826f4808e9b1a47163d6b /source/blender/editors/util
parent6a99ebcc72b136b74d1c3a154bcb7de5dae3fb38 (diff)
Fix #27328: Undoing an operation while baking fluids freezes Blender
Prevent Undo be run if there are any jobs are currently running. This also makes sense with such jobs as multires baker, for example.
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r--source/blender/editors/util/undo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index 527537b5efb..f0055bd6008 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -125,6 +125,12 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
Object *obact= CTX_data_active_object(C);
ScrArea *sa= CTX_wm_area(C);
+ /* 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_has_running(CTX_wm_manager(C))) {
+ return OPERATOR_CANCELLED;
+ }
+
/* grease pencil can be can be used in plenty of spaces, so check it first */
if(ED_gpencil_session_active()) {
return ED_undo_gpencil_step(C, step, undoname);