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:
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));
+ }
}
}
}