Skip to content

Conversation

@CasDragon
Copy link
Contributor

People in Discord were showing an error of

[RespecWrath] Error while gathering library data
[RespecWrath] System.NullReferenceException: Object reference not set to an instance of an object
  at RespecWrath.Main.PatchLibrary () [0x001ba] in 

With some logging, apparently selection.GetType() was returning Null, so I assume somehow they had a Null in the selection somehow.

Adding a Null check before adding it appears to have fixed the error and allowed the user to go through the respec process successfully. So then I added a Null check to the second selection as well, just incase.

Not sure if this will have ramifications later on for the user though

@CasDragon
Copy link
Contributor Author

ADDB tells me I should add logging to track down what is returning the null, and if it's a mod, to report it to the author. I'm not updating the PR for that, as I'm not sure if it's actually a mod or just cursed User nonsense, so I'll leave that decision up to you.

@CasDragon
Copy link
Contributor Author

Kuru had some suggestions about the null checks, and forced me to open VS again. I have not tested these changes like I did with my prior commit, but .NotNull() seems like it should do exactly what the if not null checks were doing regardless so....

The List<BlueprintFeature> tempbackgroundlist = [DeityBackground.BackgroundSelect]; change is because Kuru hated the var :owlcat_laugh:

@CasDragon
Copy link
Contributor Author

And now ADDB has suggested changes as well. This is my last commit, if someone else suggests a change, I'm closing the PR 😓

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.

1 participant