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:
Philipp Oeser 2018-10-04 11:24:17 +02:00
parent 935b18ec75
commit cc92d83d39
Notes: blender-bot 2023-02-14 07:39:44 +01:00
Referenced by issue #57111, Particle texture keyframes missing from Graph Editor unless PS has keyframes
Referenced by issue #57011, Crash pressing Free Light Cache during Indirect Light Cache Baking
1 changed files with 4 additions and 0 deletions

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