Ludeon Forums

RimWorld => Bugs => Topic started by: Kiame on February 28, 2020, 12:24:06 AM

Title: [1.1 & Royalty] Missing "pawn != null" check in ApparelScoreRaw
Post by: Kiame on February 28, 2020, 12:24:06 AM
class RimWorld.JobGiver_OptimizeApparel
function ApparelScoreRaw(Pawn pawn, Apparel ap)

Before the use of "pawn" in the majority of the method there are null checks except for the last two 'if' statements. The following if statements omit the check and are causing me problems with a mod.

if (!ap.def.apparel.CorrectGenderForWearing(pawn.gender))
...
if (pawn.royalty != null && pawn.royalty.AllTitlesInEffectForReading.Count > 0)
...


Thanks
Title: Re: [1.1 & Royalty] Missing "pawn != null" check in ApparelScoreRaw
Post by: Tynan on February 28, 2020, 12:58:48 AM
Not a game bug but if it's simple to fix let's do it.
Title: Re: [1.1 & Royalty] Missing "pawn != null" check in ApparelScoreRaw
Post by: Kiame on February 28, 2020, 01:13:40 AM
oops sorry if this was the wrong forum to report this in! (or if it was too small an issue)

In any case thank you for taking the time to respond  :)
Title: Re: [1.1 & Royalty] Missing "pawn != null" check in ApparelScoreRaw
Post by: Cynapse on February 28, 2020, 02:17:29 AM
Fixed for next build.