Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

NRE in RemoveExpiredThoughtsFromCachePatch.Prefix #98

Open
pardeike opened this issue Jul 15, 2019 · 0 comments
Open

NRE in RemoveExpiredThoughtsFromCachePatch.Prefix #98

pardeike opened this issue Jul 15, 2019 · 0 comments

Comments

@pardeike
Copy link
Contributor

I get NRE

Exception ticking Rissa (at (124, 0, 123)): System.NullReferenceException: Object reference not set to an instance of an object
at Multiplayer.Client.RemoveExpiredThoughtsFromCachePatch.Prefix (RimWorld.SituationalThoughtHandler) <0x0004b>
at (wrapper dynamic-method) RimWorld.SituationalThoughtHandler.RemoveExpiredThoughtsFromCache_Patch1 (object) <0x0001c>
at RimWorld.SituationalThoughtHandler.SituationalThoughtInterval () <0x0001c>
at RimWorld.ThoughtHandler.ThoughtInterval () <0x00026>
at RimWorld.Need_Mood.NeedInterval () <0x0005a>
at RimWorld.Pawn_NeedsTracker.NeedsTrackerTick () <0x0006c>
at (wrapper dynamic-method) Verse.Pawn.Tick_Patch2 (object) <0x0035b>
at Verse.TickList.Tick () <0x00487>

A defensive null check here:

thoughts.RemoveExpiredThoughtsFromCache();

might come handy.

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

No branches or pull requests

1 participant