svn merge -r41715:41722 ^/trunk/blender
[blender-staging.git] / source / blender / editors / sculpt_paint / paint_vertex.c
index 4d024113cf88c10e04f06d0167baa9d577bd1a2c..04239ab950808e49f6fd1692a80c80168af458c0 100644 (file)
@@ -431,8 +431,9 @@ void vpaint_fill(Object *ob, unsigned int paintcol)
        me= get_mesh(ob);
        if(me==NULL || me->totface==0) return;
 
-       if(!me->mcol)
-               make_vertexcol(ob);
+       if(!me->mcol) make_vertexcol(ob);
+       if(!me->mcol) return; /* possible we can't make mcol's */
+
 
        selected= (me->editflag & ME_EDIT_PAINT_MASK);
 
@@ -1758,8 +1759,14 @@ static void do_weight_paint_vertex( /* vars which remain the same for every vert
                if(dv_copy.dw) {
                        MEM_freeN(dv_copy.dw);
                }
+#if 0
                /* dv may have been altered greatly */
                dw = defvert_find_index(dv, vgroup);
+#else
+               dw = NULL; /* UNUSED after assignment, set to NULL to ensuyre we don't
+                               * use again, we thats needed un-ifdef the line above */
+               (void)dw;  /* quiet warnigns */
+#endif
 
                if(me->editflag & ME_EDIT_MIRROR_X) {   /* x mirror painting */
                        int index_mirr= mesh_get_x_mirror_vert(ob, index);