Merge remote-tracking branch 'origin/master' into blender2.8
[blender.git] / source / blender / editors / screen / screen_edit.c
index 5e00d158535c43ae9938299e5d204c2a9807a26d..8f9ce329231a5beabffbb8a8b673b7c25154a606 100644 (file)
@@ -2086,7 +2086,13 @@ void ED_screen_animation_timer(bContext *C, int redraws, int refresh, int sync,
                sad->flag |= (sync == 0) ? ANIMPLAY_FLAG_NO_SYNC : (sync == 1) ? ANIMPLAY_FLAG_SYNC : 0;
 
                ScrArea *sa = CTX_wm_area(C);
-               sad->from_anim_edit = (ELEM(sa->spacetype, SPACE_IPO, SPACE_ACTION, SPACE_NLA, SPACE_TIME));
+
+               char spacetype = -1;
+
+               if (sa)
+                       spacetype = sa->spacetype;
+
+               sad->from_anim_edit = (ELEM(spacetype, SPACE_IPO, SPACE_ACTION, SPACE_NLA, SPACE_TIME));
 
                screen->animtimer->customdata = sad;