prevent null reference when checking FC tag color override for players without a FC

This commit is contained in:
choco
2025-10-04 14:37:44 +02:00
parent 3d2650cc5f
commit 87e6c0b3f6

View File

@@ -70,7 +70,8 @@ public class NameplateService : DisposableMediatorSubscriberBase
{ {
handler.NameParts.TextWrap = CreateTextWrap(colors); handler.NameParts.TextWrap = CreateTextWrap(colors);
if (_configService.Current.overrideFcTagColor) if (_configService.Current.overrideFcTagColor &&
playerCharacter.CompanyTag.TextValue.Length > 0)
{ {
handler.FreeCompanyTagParts.OuterWrap = CreateTextWrap(colors); handler.FreeCompanyTagParts.OuterWrap = CreateTextWrap(colors);
handler.FreeCompanyTagParts.TextWrap = CreateTextWrap(colors); handler.FreeCompanyTagParts.TextWrap = CreateTextWrap(colors);