Crash fix (now discovered myself!). On sampling wpaint color (ctrl+lmb),

when no vertex groups exist, it was referencing illegal memory.
This commit is contained in:
Ton Roosendaal 2005-10-20 21:37:57 +00:00
parent 00496cd366
commit 446a007a43

@ -898,11 +898,6 @@ void weight_paint(void)
if((G.f & G_WEIGHTPAINT)==0) return;
if(G.obedit) return;
if(G.qual & LR_CTRLKEY) {
sample_wpaint();
return;
}
if(indexar==NULL) init_vertexpaint();
ob= OBACT;
@ -915,6 +910,11 @@ void weight_paint(void)
if (!me->dvert)
create_dverts(me);
if(G.qual & LR_CTRLKEY) {
sample_wpaint();
return;
}
/* this happens on a Bone select, when no vgroup existed yet */
if(ob->actdef==0) {
Object *modob;