Fix #22462: selecting the "Animation Step" operator from the spacebar
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 1 Jun 2010 15:35:38 +0000 (15:35 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 1 Jun 2010 15:35:38 +0000 (15:35 +0000)
menu crashes Blender, patch provided by Frederik De Bleser, thanks!

source/blender/editors/screen/screen_ops.c

index a91e6dddf75289eca4ede2d92ab6dcd99e5b3682..6004820e5c8371503bfbd6c2675d04322bdc86ad 100644 (file)
@@ -2393,8 +2393,8 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws)
 static int screen_animation_step(bContext *C, wmOperator *op, wmEvent *event)
 {
        bScreen *screen= CTX_wm_screen(C);
 static int screen_animation_step(bContext *C, wmOperator *op, wmEvent *event)
 {
        bScreen *screen= CTX_wm_screen(C);
-       
-       if(screen->animtimer==event->customdata) {
+
+       if(screen->animtimer && screen->animtimer==event->customdata) {
                Scene *scene= CTX_data_scene(C);
                wmTimer *wt= screen->animtimer;
                ScreenAnimData *sad= wt->customdata;
                Scene *scene= CTX_data_scene(C);
                wmTimer *wt= screen->animtimer;
                ScreenAnimData *sad= wt->customdata;