diff options
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_header.c')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_header.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c index b5af1ab598c..a1041bc5106 100644 --- a/source/blender/editors/space_buttons/buttons_header.c +++ b/source/blender/editors/space_buttons/buttons_header.c @@ -65,7 +65,10 @@ static void do_buttons_buttons(bContext *C, void *arg, int event) { - SpaceButs *sbuts= (SpaceButs*)CTX_wm_space_data(C); + SpaceButs *sbuts= CTX_wm_space_buts(C); + + if(!sbuts) /* window type switch */ + return; switch(event) { case B_CONTEXT_SWITCH: @@ -87,7 +90,7 @@ static void do_buttons_buttons(bContext *C, void *arg, int event) void buttons_header_buttons(const bContext *C, ARegion *ar) { - SpaceButs *sbuts= (SpaceButs*)CTX_wm_space_data(C); + SpaceButs *sbuts= CTX_wm_space_buts(C); uiBlock *block; int xco, yco= 3; |