diff options
author | Ton Roosendaal <ton@blender.org> | 2005-10-21 01:37:57 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-10-21 01:37:57 +0400 |
commit | 446a007a439b9eda1d5dc99295f1924e93ce4aa4 (patch) | |
tree | d94d8bc49c231ccb69d3b973f0c7e4a09e4aae8a /source | |
parent | 00496cd3660b4358f91fa09adc6fefa224b894c2 (diff) |
Crash fix (now discovered myself!). On sampling wpaint color (ctrl+lmb),
when no vertex groups exist, it was referencing illegal memory.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/vpaint.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/src/vpaint.c b/source/blender/src/vpaint.c index d50c4358197..5391e72853a 100644 --- a/source/blender/src/vpaint.c +++ b/source/blender/src/vpaint.c @@ -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; |