[Bf-blender-cvs] [3277bd4031d] master: Fix T52396: Crash loading template w/o config dir

Campbell Barton noreply at git.blender.org
Wed Aug 23 14:04:55 CEST 2017


Commit: 3277bd4031d08f750526168a50e1856d2936cf69
Author: Campbell Barton
Date:   Wed Aug 23 22:06:42 2017 +1000
Branches: master
https://developer.blender.org/rB3277bd4031d08f750526168a50e1856d2936cf69

Fix T52396: Crash loading template w/o config dir

===================================================================

M	source/blender/windowmanager/intern/wm_files.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 8c24110dc25..637ace9cd82 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -738,13 +738,13 @@ int wm_homefile_read(
 
 	if ((app_template != NULL) && (app_template[0] != '\0')) {
 		BKE_appdir_app_template_id_search(app_template, app_template_system, sizeof(app_template_system));
-		BLI_path_join(app_template_config, sizeof(app_template_config), cfgdir, app_template, NULL);
 
 		/* Insert template name into startup file. */
 
 		/* note that the path is being set even when 'use_factory_settings == true'
 		 * this is done so we can load a templates factory-settings */
 		if (!use_factory_settings) {
+			BLI_path_join(app_template_config, sizeof(app_template_config), cfgdir, app_template, NULL);
 			BLI_path_join(filepath_startup, sizeof(filepath_startup), app_template_config, BLENDER_STARTUP_FILE, NULL);
 			if (BLI_access(filepath_startup, R_OK) != 0) {
 				filepath_startup[0] = '\0';



More information about the Bf-blender-cvs mailing list