[1.1 & Royalty] Missing "pawn != null" check in ApparelScoreRaw

Started by Kiame, February 28, 2020, 12:24:06 AM

Previous topic - Next topic

Kiame

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

Tynan

Tynan Sylvester - @TynanSylvester - Tynan's Blog

Kiame

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  :)