diff --git a/Directory.Build.targets b/Directory.Build.targets index c8c6829..96fab01 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -12,7 +12,7 @@ 0 1 - 3 + 4 $(MajorVersion).$(MinorVersion).$(PatchVersion) $(AssemblyVersion) $(AssemblyVersion) diff --git a/TweaksAndThings/TweaksAndThings.cs b/TweaksAndThings/TweaksAndThings.cs index 734bea0..c7800d1 100644 --- a/TweaksAndThings/TweaksAndThings.cs +++ b/TweaksAndThings/TweaksAndThings.cs @@ -43,8 +43,9 @@ namespace TweaksAndThings //moddingContext.RegisterConsoleCommand(new EchoCommand()); settings = moddingContext.LoadSettingsData(self.Id); - if (!settings.WebhookSettingsList?.Any() ?? true) + if (!settings?.WebhookSettingsList?.Any() ?? true) { + if (settings == null) settings = new(); settings.WebhookSettingsList = new[] { new WebhookSettings() }.ToList(); this.moddingContext.SaveSettingsData(this.modDefinition.Id, settings ?? new()); }