From 10a1c90f046c501b2ede5e39776700fde0072e81 Mon Sep 17 00:00:00 2001 From: Jerome St-Louis Date: Sat, 22 Oct 2016 09:56:09 -0400 Subject: [PATCH] ide/IDESettings: Fixed issues with fresh install - Fixed crash on first save of recentProjects (null array) - Fixed compilerConfigs not being carried over from system wide settings --- ide/src/IDESettings.ec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ide/src/IDESettings.ec b/ide/src/IDESettings.ec index a1ea2b0..ab38ac5 100644 --- a/ide/src/IDESettings.ec +++ b/ide/src/IDESettings.ec @@ -530,6 +530,7 @@ class IDESettingsContainer : GlobalSettings int c; bool locked; for(c = 0; c < 10 && !(locked = f.Lock(shared, 0, 0, false)); c++) ecere::sys::Sleep(0.01); + if(!recentProjects) recentProjects = { }; recentProjects.read(this); f.Unlock(0,0,true); delete f; @@ -653,7 +654,15 @@ private: if(result == fileNotFound || (settingsFilePath && isGlobalPath)) { bool retryNewConfig = settingsFilePath && isGlobalPath; - oldConfig = true; + + if(retryNewConfig) + { + // Need to load the data outside of main config file first + data.compilerConfigs.read(this); + data.recentFiles.read(this); + data.recentProjects.read(this); + } + oldConfig = true; // WARNING: This is being used with two meanings: Old format and loaded from system-wide settings useNewConfigurationFiles = false; if(retryNewConfig) { -- 1.8.3.1