fix: handle case where PartyMember.Actor is null
I don't know how this is possible, but someone had this happen, so I guess just coalesce the null. If the targeter is in the party, this will result in incorrect behaviour and log them, but it's better than a crash.
This commit is contained in:
parent
0d1f40823e
commit
141a2fad25
|
@ -500,7 +500,7 @@ namespace PeepingTom {
|
|||
return this.pi.ClientState.Actors
|
||||
.Where(actor => actor.TargetActorID == player.ActorId && actor is PlayerCharacter)
|
||||
.Select(actor => actor as PlayerCharacter)
|
||||
.Where(actor => this.config.LogParty || this.pi.ClientState.PartyList.All(member => member.Actor.ActorId != actor.ActorId))
|
||||
.Where(actor => this.config.LogParty || this.pi.ClientState.PartyList.All(member => member.Actor?.ActorId != actor.ActorId))
|
||||
.Where(actor => this.config.LogAlliance || !this.InAlliance(actor))
|
||||
.Where(actor => this.config.LogInCombat || !this.InCombat(actor))
|
||||
.ToArray();
|
||||
|
|
Loading…
Reference in New Issue