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>2009-11-05 13:50:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-05 13:50:58 +0300
commitcacd68c3359c74f5f2ab7bae304ffeb59ee6e9da (patch)
tree9b2ca3d2eea82189c8700889973f0f5dd7c59a3b /source/blender/editors/screen/screen_context.c
parent06d5d53a240cf98aee52a45317ac2f979be7e58a (diff)
python console autocomplete would crash (missing NULL check for pose channels)
add rna functions id.animation_data_create() and id.animation_data_clear() - works for all ID types that support animdata.
Diffstat (limited to 'source/blender/editors/screen/screen_context.c')
-rw-r--r--source/blender/editors/screen/screen_context.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index 130ffeb412a..b0e255d60d4 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -196,7 +196,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
bArmature *arm= (obact) ? obact->data : NULL;
bPoseChannel *pchan;
- if (obact && arm) {
+ if (obact && obact->pose && arm) {
for (pchan= obact->pose->chanbase.first; pchan; pchan= pchan->next) {
/* ensure that PoseChannel is on visible layer and is not hidden in PoseMode */
if ((pchan->bone) && (arm->layer & pchan->bone->layer) && !(pchan->bone->flag & BONE_HIDDEN_P)) {
@@ -211,7 +211,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
bArmature *arm= (obact) ? obact->data : NULL;
bPoseChannel *pchan;
- if (obact && arm) {
+ if (obact && obact->pose && arm) {
for (pchan= obact->pose->chanbase.first; pchan; pchan= pchan->next) {
/* ensure that PoseChannel is on visible layer and is not hidden in PoseMode */
if ((pchan->bone) && (arm->layer & pchan->bone->layer) && !(pchan->bone->flag & BONE_HIDDEN_P)) {