Skip to content

Commit 66c60cf

Browse files
committed
Bug fix, resetting when not initialized
Initialize() is not always called so we should not always reset.
1 parent 5bda990 commit 66c60cf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/DllManipulatorScript.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ private void OnDestroy()
110110
//On Preloaded mode this leads to NullReferenceException, but on Lazy mode the DLL and function would be just reloaded so we would up with loaded DLL after game exit.
111111
//Thankfully thread safety with Lazy mode is not implemented yet.
112112

113-
DllManipulator.Reset();
113+
if (DllManipulator.Options != null) // Check that we have initialized
114+
DllManipulator.Reset();
114115
_singletonInstance = null;
115116
}
116117
}

0 commit comments

Comments
 (0)