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
This commit is contained in:
2018-10-04 11:24:17 +02:00
parent 935b18ec75
commit cc92d83d39

View File

@@ -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;
}