mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix #164433: Crash using Bake operator in viewport with hidden object
The bake operator's poll function checked both the context's `object` & `active_object` properties, while invoke/exec only used `active_object`. If only `object` is set, as is the case running from the viewport with the current object hidden, poll would succeed, while invoke/exec would get a nullptr and crash. Fixed by using `context_active_object` to get the object for invoke/exec to match poll. Pull Request: https://projects.blender.org/blender/blender/pulls/164434
This commit is contained in:
parent
98e452b04a
commit
babb60703e
1 changed files with 1 additions and 1 deletions
|
|
@ -1854,7 +1854,7 @@ static void bake_init_api_data(wmOperator *op, bContext *C, BakeAPIRender *bkr)
|
|||
{
|
||||
bScreen *screen = CTX_wm_screen(C);
|
||||
|
||||
bkr->ob = CTX_data_active_object(C);
|
||||
bkr->ob = context_active_object(C);
|
||||
bkr->main = CTX_data_main(C);
|
||||
bkr->view_layer = CTX_data_view_layer(C);
|
||||
bkr->scene = CTX_data_scene(C);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue