diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-28 20:33:02 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-28 20:33:02 +0400 |
commit | 74e4ad20c9e8d19f85aaa2995652e3f65bdfc0c9 (patch) | |
tree | 7f20ead7facacb69f02ab9384bcd855598878133 /source/blender/editors/animation/keyframing.c | |
parent | f4f3a9b08b04077e6e9272e4fdd4cd550b47be02 (diff) |
2.5: code cleanup, added CTX_wm_space_* for each space type,
instead of casting everywhere.
Diffstat (limited to 'source/blender/editors/animation/keyframing.c')
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 60d0aa2c7bd..7bee57708ec 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -965,18 +965,15 @@ static int modify_key_op_poll(bContext *C) { ScrArea *sa= CTX_wm_area(C); Scene *scene= CTX_data_scene(C); + SpaceOops *so= CTX_wm_space_outliner(C); /* if no area or active scene */ if (ELEM(NULL, sa, scene)) return 0; /* if Outliner, only allow in DataBlocks view */ - if (sa->spacetype == SPACE_OUTLINER) { - SpaceOops *so= (SpaceOops *)CTX_wm_space_data(C); - - if ((so->outlinevis != SO_DATABLOCKS)) - return 0; - } + if (so && (so->outlinevis != SO_DATABLOCKS)) + return 0; /* TODO: checks for other space types can be added here */ |