Blender Git Loki

Git Commits -> Revision 42a5177

Revision 42a5177 by Philipp Oeser (blender-v2.83-release, tmp-2.83-cycles-rtx3-kernels, tmp-T80603)
June 18, 2020, 07:28 (GMT)
Fix T77047: Dyntopo Sample detail size on hidden mesh causes crash

The `Toolbar` and `Sidebar` hide the corresponding panel
`VIEW3D_PT_sculpt_dyntopo` by polling for context.sculpt_object and
context.tool_settings.sculpt. In the Active Tool in the Properties
Editor this poll does not return False though, thus the
sample_detail_size is possible from there.

Second security check (the operator poll `SCULPT_mode_poll`) checks the
active object -- that is still valid even if hidden, so we are allowed
to execute the operator. However the active object becomes NULL once the
area is switched in `sample_detail()` -- see `CTX_wm_area_set`), leading
to the crash.

Dont think there is a quick and easy way to do this in the poll from the
Properties Editor, so just check for a valid active abject in the
operator and return OPERATOR_CANCELLED if we dont have it.

Maniphest Tasks: T77047

Differential Revision: https://developer.blender.org/D7832

Commit Details:

Full Hash: 42a517779ab3d1f884195282744dd57444641a38
Parent Commit: 60bf482
Lines Changed: +4, -1

1 Modified Path:

/source/blender/editors/sculpt_paint/sculpt_detail.c (+4, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021