diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-14 20:08:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-14 20:08:02 +0300 |
commit | 9a7f6e937bc80b9e72b503d0b0fb07ea840a3e38 (patch) | |
tree | ddd430fec420aac7c799cfee4ac2aa4c36c2ab29 /source/blender/editors | |
parent | 6760dbf2adc1fa749dc0107d95745cbe9a6611d5 (diff) |
Fix #20345: weight paint crashes with armature modifier without object.
Also fixes:
* Weight paint subsurf drawing.
* Missing pointer endian conversion in paint brushes.
* Use of unitialized variable in screen version patch.
* Multires modifier without mdisps layer crash.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 7021d76b1c4..56e020e22aa 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1300,15 +1300,18 @@ static char *wpaint_make_validmap(Mesh *me, Object *ob) if (md->type == eModifierType_Armature) { amd = (ArmatureModifierData*) md; - pose = amd->object->pose; - - for (chan=pose->chanbase.first; chan; chan=chan->next) { - if (chan->bone->flag & BONE_NO_DEFORM) - continue; - if (BLI_ghash_haskey(gh, chan->name)) { - BLI_ghash_remove(gh, chan->name, NULL, NULL); - BLI_ghash_insert(gh, chan->name, SET_INT_IN_POINTER(1)); + if(amd->object && amd->object->pose) { + pose = amd->object->pose; + + for (chan=pose->chanbase.first; chan; chan=chan->next) { + if (chan->bone->flag & BONE_NO_DEFORM) + continue; + + if (BLI_ghash_haskey(gh, chan->name)) { + BLI_ghash_remove(gh, chan->name, NULL, NULL); + BLI_ghash_insert(gh, chan->name, SET_INT_IN_POINTER(1)); + } } } } |