Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-10 10:06:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-10 10:06:35 +0400
commitc2d6fc4da3f410ddadfdcc7105854f01b26e9e45 (patch)
tree3daa15513563229c83d2ab8466d569de44419e0a
parentcd9b51c1bf36532ca48c8995dd2d30eba0fded5b (diff)
- possible fix for vertex paint 'fill' crash.
- remove unneeded call to defvert_find_index() when weight painting.
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index e55438a30b8..7144ae3e31a 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -364,8 +364,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);
@@ -1679,8 +1680,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);