diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index aa2f103c693..6072704100c 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5483,10 +5483,17 @@ static void direct_link_windowmanager(BlendDataReader *reader, wmWindowManager * WorkSpaceInstanceHook *hook = win->workspace_hook; BLO_read_data_address(reader, &win->workspace_hook); - /* We need to restore a pointer to this later when reading workspaces, - * so store in global oldnew-map. - * Note that this is only needed for versionning of older .blend files now.. */ - oldnewmap_insert(reader->fd->globmap, hook, win->workspace_hook, 0); + /* This will be NULL for any pre-2.80 blend file. */ + if (win->workspace_hook != NULL) { + /* We need to restore a pointer to this later when reading workspaces, + * so store in global oldnew-map. + * Note that this is only needed for versionning of older .blend files now.. */ + oldnewmap_insert(reader->fd->globmap, hook, win->workspace_hook, 0); + /* Cleanup pointers to data outside of this data-block scope. */ + win->workspace_hook->act_layout = NULL; + win->workspace_hook->temp_workspace_store = NULL; + win->workspace_hook->temp_layout_store = NULL; + } direct_link_area_map(reader, &win->global_areas); |