diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-11-02 16:26:49 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-11-02 16:28:10 +0300 |
commit | 42f6aada98a655bce975a8dc24aa67e33200fbd9 (patch) | |
tree | f2d5d4368e8d58391499853f4bd0a6b3948dea15 /source/blender/editors | |
parent | 9e736fc98481949e50f50dc59aaedc336ea76811 (diff) |
Fix crash opening some 2.4x .blend files with drivers or NLA editor
For example, outlinertest.blend from test240.zip.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_nla/space_nla.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c index 7e3f90b01ba..c6fe1b8539e 100644 --- a/source/blender/editors/space_nla/space_nla.c +++ b/source/blender/editors/space_nla/space_nla.c @@ -148,7 +148,7 @@ static void nla_init(struct wmWindowManager *wm, ScrArea *area) /* init dopesheet data if non-existent (i.e. for old files) */ if (snla->ads == NULL) { snla->ads = MEM_callocN(sizeof(bDopeSheet), "NlaEdit DopeSheet"); - snla->ads->source = (ID *)WM_window_get_active_scene(wm->winactive); + snla->ads->source = (wm->winactive) ? (ID *)WM_window_get_active_scene(wm->winactive) : NULL; } ED_area_tag_refresh(area); |