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

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

Previous topic - Next topic


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)



Tynan Sylvester - @TynanSylvester - Tynan's Blog


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