Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toolbat Icons: NullReference when calling GetApi #83

Open
Becks723 opened this issue Apr 3, 2024 · 0 comments
Open

Toolbat Icons: NullReference when calling GetApi #83

Becks723 opened this issue Apr 3, 2024 · 0 comments

Comments

@Becks723
Copy link

Becks723 commented Apr 3, 2024

Hello, someone had reported an error to me. When trying to getapi from Toolbar Icons, it says NullReferenceException. (https://smapi.io/log/61ce5105734041a8aa4da78555d0df7d)

Failed loading the per-mod API instance from Toolbar Icons. Integrations with other mods may not work. 
Error: NullReferenceException: Object reference not set to an instance of an object. 
at StardewMods.ToolbarIcons.ModEntry.GetApi(IModInfo mod) in X:\Repos\stardew-mods\ToolbarIcons\ModEntry.cs:line 33 
at StardewModdingAPI.Framework.ModHelpers.ModRegistryHelper.GetApi(String uniqueID) in SMAPI\Framework\ModHelpers\ModRegistryHelper.cs:line 88

I assume it's the container object not been initialized yet when my mod firstly reached OnGameLaunched.
So I think container needs to be inited early in the Entry part, rather than OnGameLaunched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant