Fix: crash in the weight paint poll function
The poll function didn't account for there being no active region.
This commit is contained in:
@@ -1604,8 +1604,8 @@ static bool weight_paint_poll_ex(bContext *C, bool check_tool)
|
||||
(BKE_paint_brush(&CTX_data_tool_settings(C)->wpaint->paint) != nullptr) &&
|
||||
(area = CTX_wm_area(C)) && (area->spacetype == SPACE_VIEW3D))
|
||||
{
|
||||
ARegion *region = CTX_wm_region(C);
|
||||
if (ELEM(region->regiontype, RGN_TYPE_WINDOW, RGN_TYPE_HUD)) {
|
||||
const ARegion *region = CTX_wm_region(C);
|
||||
if (region && ELEM(region->regiontype, RGN_TYPE_WINDOW, RGN_TYPE_HUD)) {
|
||||
if (!check_tool || WM_toolsystem_active_tool_is_brush(C)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user