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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-12-14 20:08:02 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-12-14 20:08:02 +0300
commit9a7f6e937bc80b9e72b503d0b0fb07ea840a3e38 (patch)
treeddd430fec420aac7c799cfee4ac2aa4c36c2ab29 /source/blender/editors
parent6760dbf2adc1fa749dc0107d95745cbe9a6611d5 (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.c19
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));
+ }
}
}
}