From e0a65412ddfeba1551c7903ce41b5773bd10c7f3 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Fri, 28 Jul 2017 18:06:41 -0500 Subject: [PATCH] Fix startup bug when running for first time --- EduNetworkBuilder/NBSettings.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/EduNetworkBuilder/NBSettings.cs b/EduNetworkBuilder/NBSettings.cs index 649bff6..ccd70a1 100644 --- a/EduNetworkBuilder/NBSettings.cs +++ b/EduNetworkBuilder/NBSettings.cs @@ -43,7 +43,10 @@ namespace EduNetworkBuilder { if (FromClass == null) return; //Break if we are going to error out. if (ToClass == null) return; //Break if we are going to error out. - // + // + if (Properties.Settings.Default.ScoreList == null) + Properties.Settings.Default.ScoreList = new System.Collections.Specialized.StringCollection(); + ToClass.LastPath = FromClass.LastPath; ToClass.AutoStartPuzzles = FromClass.AutoStartPuzzles; ToClass.ChosenLanguage = FromClass.ChosenLanguage; @@ -84,6 +87,9 @@ namespace EduNetworkBuilder } else { + if (Properties.Settings.Default.ScoreList == null) + Properties.Settings.Default.ScoreList = new System.Collections.Specialized.StringCollection(); + LastPath = Properties.Settings.Default.LastPath; AutoStartPuzzles = Properties.Settings.Default.AutoStartPuzzles; ChosenLanguage = Properties.Settings.Default.ChosenLanguage;