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:
authorPhilipp Oeser <info@graphics-engineer.com>2018-10-04 12:24:17 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2018-10-04 12:24:17 +0300
commitcc92d83d398854f461fe042959c384306d38320a (patch)
tree224fd128756651dbd66227c57525ca5f744f499b /source/blender/editors/render/render_shading.c
parent935b18ec7563ff9bfc78300972bd0a8673aac8ee (diff)
Fix T57011: Crash pressing Free Light Cache during Indirect Light Cache
Baking just kill the bake job prior to freeing Reviewed By: fclem Differential Revision: https://developer.blender.org/D3764
Diffstat (limited to 'source/blender/editors/render/render_shading.c')
-rw-r--r--source/blender/editors/render/render_shading.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 78d3373c88c..43680107dbd 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -833,6 +833,10 @@ static int light_cache_free_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene = CTX_data_scene(C);
+ /* kill potential bake job first (see T57011) */
+ wmWindowManager *wm = CTX_wm_manager(C);
+ WM_jobs_kill_type(wm, scene, WM_JOB_TYPE_LIGHT_BAKE);
+
if (!scene->eevee.light_cache) {
return OPERATOR_CANCELLED;
}