RimWorld

RimWorld

[1001] Unofficial Vanilla Outposts Expanded Expanded: Trading (Continued)
Scorpio 23 Feb, 2024 @ 2:14pm
Null check needed
System.NullReferenceException: Object reference not set to an instance of an object
at Outposts.Outpost+<>c. <CheckNoDestroyedOrNoStack>b__94_0 (Verse.Thing x)
at System.Collections.Generic.List`1[T].FindIndex (System.Int32 startIndex, System.Int32 count, System.Predicate`1[T] match)
at System.Collections.Generic.List`1[T].FindIndex (System.Predicate`1[T] match)
at Verse.GenCollection.Any[T] (System.Collections.Generic.List`1[T] list, System.Predicate`1[T] predicate)
at Outposts.Outpost.CheckNoDestroyedOrNoStack ()
at (wrapper dynamic-method) Outposts.Outpost.Outposts.Outpost.OutpostHealthTick_Patch2(Outposts.Outpost,Verse.Pawn)
at (wrapper dynamic-method) Outposts.Outpost.Outposts.Outpost.SatisfyNeeds_Patch1(Outposts.Outpost,Verse.Pawn)
at Outposts.Outpost.SatisfyNeeds ()
at Outposts.Outpost.Tick ()
at RimWorld.Planet.WorldObjectsHolder.WorldObjectsHolderTick ()
at RimWorld.Planet.World.WorldTick ()
at (wrapper dynamic-method) Verse.TickManager.Verse.TickManager.DoSingleTick_Patch4(Verse.TickManager)

if a null item somehow is sent to the outpost it breaks it spewing errors
null check is needed just in case