Avoid assert weight painting w/o an active group

This commit is contained in:
Campbell Barton 2015-11-04 04:37:47 +11:00
parent 020fdeb760
commit 7f57bc9ef4
2 changed files with 2 additions and 2 deletions

@ -1443,7 +1443,7 @@ static void calc_weightpaint_vert_array(
MDeformVert *dv = DM_get_vert_data_layer(dm, CD_MDEFORMVERT);
int numVerts = dm->getNumVerts(dm);
if (dv) {
if (dv && (ob->actdef != 0)) {
unsigned char (*wc)[4] = r_wtcol_v;
unsigned int i;

@ -985,7 +985,7 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, const wmEvent *even
view3d_set_viewcontext(C, &vc);
me = BKE_mesh_from_object(vc.obact);
if (me && me->dvert && vc.v3d && vc.rv3d) {
if (me && me->dvert && vc.v3d && vc.rv3d && (vc.obact->actdef != 0)) {
const bool use_vert_sel = (me->editflag & ME_EDIT_PAINT_VERT_SEL) != 0;
int v_idx_best = -1;
unsigned int index;