[Bf-blender-cvs] [42f6aada98a] blender-v2.91-release: Fix crash opening some 2.4x .blend files with drivers or NLA editor
Brecht Van Lommel
noreply at git.blender.org
Mon Nov 2 14:28:29 CET 2020
Commit: 42f6aada98a655bce975a8dc24aa67e33200fbd9
Author: Brecht Van Lommel
Date: Mon Nov 2 14:26:49 2020 +0100
Branches: blender-v2.91-release
https://developer.blender.org/rB42f6aada98a655bce975a8dc24aa67e33200fbd9
Fix crash opening some 2.4x .blend files with drivers or NLA editor
For example, outlinertest.blend from test240.zip.
===================================================================
M source/blender/blenloader/intern/readfile.c
M source/blender/editors/space_nla/space_nla.c
===================================================================
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index c49808c3718..5a6324eb8e1 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2527,7 +2527,9 @@ static void direct_link_ipo(BlendDataReader *reader, Ipo *ipo)
/* Undo generic endian switching. */
if (BLO_read_requires_endian_switch(reader)) {
BLI_endian_switch_int16(&ipo->blocktype);
- BLI_endian_switch_int16(&icu->driver->blocktype);
+ if (icu->driver != NULL) {
+ BLI_endian_switch_int16(&icu->driver->blocktype);
+ }
}
}
}
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);
More information about the Bf-blender-cvs
mailing list