From 6902ef48d18d88183f3f96df5e2af1d95922b439 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Sun, 3 Jul 2022 22:47:15 +0200 Subject: [PATCH] Fix crash during migration --- Penumbra/Configuration.Migration.cs | 2 +- Penumbra/Penumbra.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Penumbra/Configuration.Migration.cs b/Penumbra/Configuration.Migration.cs index b1714470..a62c091b 100644 --- a/Penumbra/Configuration.Migration.cs +++ b/Penumbra/Configuration.Migration.cs @@ -182,7 +182,7 @@ public partial class Configuration DefaultCollection = _data[ nameof( DefaultCollection ) ]?.ToObject< string >() ?? DefaultCollection; CharacterCollections = _data[ nameof( CharacterCollections ) ]?.ToObject< Dictionary< string, string > >() ?? CharacterCollections; ModCollection.Manager.SaveActiveCollections( DefaultCollection, CurrentCollection, - CharacterCollections.Select( kvp => ( kvp.Key, kvp.Value ) ), Array.Empty<(CollectionType, string)>() ); + CharacterCollections.Select( kvp => ( kvp.Key, kvp.Value ) ), Array.Empty< (CollectionType, string) >() ); } // Collections were introduced and the previous CurrentCollection got put into ModDirectory. diff --git a/Penumbra/Penumbra.cs b/Penumbra/Penumbra.cs index ea5ec046..7aa61f30 100644 --- a/Penumbra/Penumbra.cs +++ b/Penumbra/Penumbra.cs @@ -73,7 +73,8 @@ public class Penumbra : IDalamudPlugin DevPenumbraExists = CheckDevPluginPenumbra(); IsNotInstalledPenumbra = CheckIsNotInstalled(); - Framework = new FrameworkManager(); + Framework = new FrameworkManager(); + CharacterUtility = new CharacterUtility(); Backup.CreateBackup( PenumbraBackupFiles() ); Config = Configuration.Load(); @@ -82,7 +83,6 @@ public class Penumbra : IDalamudPlugin ResourceLoader = new ResourceLoader( this ); ResourceLoader.EnableHooks(); ResourceLogger = new ResourceLogger( ResourceLoader ); - CharacterUtility = new CharacterUtility(); ResidentResources = new ResidentResourceManager(); ModManager = new Mod.Manager( Config.ModDirectory ); ModManager.DiscoverMods();