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

(HS2) Fix the ChaControl.UpdateWet NullReferenceException #25

Merged
merged 1 commit into from Feb 27, 2021
Merged

(HS2) Fix the ChaControl.UpdateWet NullReferenceException #25

merged 1 commit into from Feb 27, 2021

Conversation

OrangeSpork
Copy link
Contributor

This tends to happen with some mods ported from AIS, they have CmpHair or CmpClothes MB setups with a null renderer in the array. Most of Illusion code handles this but the ChaControl.UpdateWet doesn't handle the NullReference and spams the following error per frame:

NullReferenceException: Object reference not set to an instance of an object
at AIChara.ChaControl.UpdateWet () [0x001b5] in :0
at AIChara.ChaControl.UpdateForce () [0x0001f] in :0
at Manager.Character.Update () [0x00026] in :0

This fix simply scans for and removes null renderers from the renderer array, thus fixing the not fully applied wet effects and more importantly the performance hit on the constant log spam.

@ManlyMarco ManlyMarco merged commit 9bf7398 into IllusionMods:master Feb 27, 2021
@ManlyMarco
Copy link
Collaborator

Looks good, thank you!

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

Successfully merging this pull request may close these issues.

None yet

2 participants