mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Change InstalledAddon API
This commit is contained in:
parent
9383722480
commit
ff22b3246c
@ -445,7 +445,15 @@ namespace NewHorizons
|
||||
|
||||
public string[] GetInstalledAddons()
|
||||
{
|
||||
return Main.MountedAddons.Select(x => x.ModHelper.Manifest.UniqueName).ToArray();
|
||||
try
|
||||
{
|
||||
return Main.MountedAddons.Select(x => x?.ModHelper?.Manifest?.UniqueName).ToArray();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError($"Couldn't get installed addons {ex.Message}, {ex.StackTrace}");
|
||||
return new string[] { };
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion API
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user