Fix T51792: crash calling bpy.ops.screen.animation_cancel while scrubbing.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 24 Jun 2017 16:02:30 +0000 (18:02 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 24 Jun 2017 16:02:30 +0000 (18:02 +0200)
source/blender/editors/screen/screen_ops.c

index 9dbc082c1193e8af75d6039ffc768f8186e9920e..c99d9add432206db919706577b84df34b4452de8 100644 (file)
@@ -3756,7 +3756,7 @@ static int screen_animation_cancel_exec(bContext *C, wmOperator *op)
        bScreen *screen = ED_screen_animation_playing(CTX_wm_manager(C));
 
        if (screen) {
-               if (RNA_boolean_get(op->ptr, "restore_frame")) {
+               if (RNA_boolean_get(op->ptr, "restore_frame") && screen->animtimer) {
                        ScreenAnimData *sad = screen->animtimer->customdata;
                        Scene *scene = CTX_data_scene(C);