Fix #129578: Crash setting pose mode using Context.temp_override(..)
This commit is contained in:
parent
8c3b734560
commit
007fd95f17
@ -61,6 +61,9 @@ static void toolsystem_ref_set_by_brush_type(bContext *C, const char *brush_type
|
||||
bToolRef *WM_toolsystem_ref_from_context(const bContext *C)
|
||||
{
|
||||
WorkSpace *workspace = CTX_wm_workspace(C);
|
||||
if (workspace == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
const Scene *scene = CTX_data_scene(C);
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
ScrArea *area = CTX_wm_area(C);
|
||||
@ -133,6 +136,9 @@ static const bToolRef *toolsystem_active_tool_from_context_or_view3d(const bCont
|
||||
|
||||
/* Otherwise: Fallback to getting the active tool for 3D views. */
|
||||
WorkSpace *workspace = CTX_wm_workspace(C);
|
||||
if (workspace == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
const Scene *scene = CTX_data_scene(C);
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
bToolKey tkey{};
|
||||
@ -1023,7 +1029,9 @@ static void wm_toolsystem_update_from_context_view3d_impl(bContext *C, WorkSpace
|
||||
void WM_toolsystem_update_from_context_view3d(bContext *C)
|
||||
{
|
||||
WorkSpace *workspace = CTX_wm_workspace(C);
|
||||
wm_toolsystem_update_from_context_view3d_impl(C, workspace);
|
||||
if (workspace) {
|
||||
wm_toolsystem_update_from_context_view3d_impl(C, workspace);
|
||||
}
|
||||
|
||||
/* Multi window support. */
|
||||
Main *bmain = CTX_data_main(C);
|
||||
|
Loading…
x
Reference in New Issue
Block a user