Valheim-Modding / Jotunn

Jötunn, the Valheim Library.
https://valheim-modding.github.io/Jotunn/
MIT License
120 stars 40 forks source link

Fix for 2 NREs related to assets #427

Closed probablykory closed 4 months ago

probablykory commented 4 months ago

Fix for 2 NREs that seem to occur while running Jotunn mods alongside Krumpac's Reforged modpack.

probablykory commented 4 months ago

Tested normal operation (0.217.46 with MoreCrossbows and Jotunn), and this change seems to be benign. Tested with Reforged, and with the change it works fine. Without the change (eg tested with Jotunn 2.19.3 to verify) it does indeed throw an NRE.

[Error  :Jotunn.Managers.GUIManager] System.NullReferenceException: Object reference not set to an instance of an object
  at Jotunn.Managers.PrefabManager+Cache.GetPrefab (System.Type type, System.String name) [0x0002a] in D:\Projects\Jotunn\JotunnLib\Managers\PrefabManager.cs:444
  at Jotunn.Managers.PrefabManager+Cache.GetPrefab[T] (System.String name) [0x00000] in D:\Projects\Jotunn\JotunnLib\Managers\PrefabManager.cs:472
  at Jotunn.Managers.GUIManager.InitializeAssets () [0x002ec] in D:\Projects\Jotunn\JotunnLib\Managers\GUIManager.cs:423

Full log attached.

MSchmoecker commented 4 months ago

thanks, looks good now