Nirv-git/CVRMods-Nirv

[PortableMirror] Errors during mod initialization

Closed this issue · 2 comments

image

I'm getting some errors during other mods initialization, I was looking for the issue at it seems it happens when OnPreferencesSaved is called (because another mod saved prefs for example) and PortableMirror's OnApplicationStart wasn't called yet.

The NullReferenceException is coming from

if (Main.distanceDisable.Value)

Because distanceDisable was not initialized yet.

Bah, why must some mods call a global OnPrefSave on init, if they want they can just call their own OnPrefSav method.

Will fix in next version

heh- all my mods used to save preferences on startup

sdraw chewed me out for that~