Commit: 1f1d302950044592b8812c022897abfc838580a4 Author: Brecht Van Lommel Date: Tue Jul 16 16:06:50 2019 +0200 Branches: master https://developer.blender.org/rB1f1d302950044592b8812c022897abfc838580a4
Fix T66940, T67005, T60651: append workspace from old startup file fails Don't try to use old screens as workspaces, just leave them out of the menu. Differential Revision: https://developer.blender.org/D5270 =================================================================== M source/blender/blenkernel/intern/blendfile.c =================================================================== diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c index 570805a01d0..afbd2627a2a 100644 --- a/source/blender/blenkernel/intern/blendfile.c +++ b/source/blender/blenkernel/intern/blendfile.c @@ -670,9 +670,14 @@ WorkspaceConfigFileData *BKE_blendfile_workspace_config_read(const char *filepat } if (bfd) { - workspace_config = MEM_mallocN(sizeof(*workspace_config), __func__); + workspace_config = MEM_callocN(sizeof(*workspace_config), __func__); workspace_config->main = bfd->main; - workspace_config->workspaces = bfd->main->workspaces; + + /* Only 2.80+ files have actual workspaces, don't try to use screens + * from older versions. */ + if (bfd->main->versionfile >= 280) { + workspace_config->workspaces = bfd->main->workspaces; + } MEM_freeN(bfd); } _______________________________________________ Bf-blender-cvs mailing list [email protected] https://lists.blender.org/mailman/listinfo/bf-blender-cvs
