Bake API: reports were used after being freed leading to random crashes (fix T40077)

This commit is contained in:
Dalai Felinto 2014-05-09 12:29:50 -03:00
parent 97823f6047
commit f194da3455
Notes: blender-bot 2023-02-14 10:41:18 +01:00
Referenced by commit c80e9866c8, Revert "Fix wrong job type used in cycles bake operator, could cause crashes."
Referenced by issue #40077, crash trying to bake to active TS n-maps
1 changed files with 1 additions and 1 deletions

View File

@ -1045,7 +1045,7 @@ static int bake_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)
/* setup job */
wm_job = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Texture Bake",
WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS, WM_JOB_TYPE_OBJECT_BAKE_TEXTURE);
WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS, WM_JOB_TYPE_OBJECT_BAKE);
WM_jobs_customdata_set(wm_job, bkr, bake_freejob);
WM_jobs_timer(wm_job, 0.5, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */
WM_jobs_callbacks(wm_job, bake_startjob, NULL, NULL, NULL);