Fix #120015: Weight paint crash with shift to blur

This commit is contained in:
Brecht Van Lommel 2024-03-28 16:42:21 +01:00
parent 0334ce5666
commit 451bf56409
1 changed files with 2 additions and 0 deletions

View File

@ -1010,6 +1010,8 @@ static bool wpaint_stroke_test_start(bContext *C, wmOperator *op, const float mo
vwpaint::update_cache_invariants(C, vp, ss, op, mouse);
vwpaint::init_session_data(ts, ob);
/* Brush may have changed after initialization. */
brush = BKE_paint_brush(&vp->paint);
if (ELEM(brush->weightpaint_tool, WPAINT_TOOL_SMEAR, WPAINT_TOOL_BLUR)) {
wpd->precomputed_weight = (float *)MEM_mallocN(sizeof(float) * mesh->verts_num, __func__);
}