mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Improve null checking for badly set properties in NamePlateGui (#2245)
This commit is contained in:
parent
2787e37548
commit
708f3d0ab2
2 changed files with 4 additions and 4 deletions
|
|
@ -53,7 +53,7 @@ public class NamePlateQuotedParts(NamePlateStringField field, bool isFreeCompany
|
|||
return;
|
||||
|
||||
var sb = new SeStringBuilder();
|
||||
if (this.OuterWrap is { Item1: var outerLeft })
|
||||
if (this.OuterWrap is { Item1: { } outerLeft })
|
||||
{
|
||||
sb.Append(outerLeft);
|
||||
}
|
||||
|
|
@ -67,7 +67,7 @@ public class NamePlateQuotedParts(NamePlateStringField field, bool isFreeCompany
|
|||
sb.Append(isFreeCompany ? " «" : "《");
|
||||
}
|
||||
|
||||
if (this.TextWrap is { Item1: var left, Item2: var right })
|
||||
if (this.TextWrap is { Item1: { } left, Item2: { } right })
|
||||
{
|
||||
sb.Append(left);
|
||||
sb.Append(this.Text ?? this.GetStrippedField(handler));
|
||||
|
|
@ -87,7 +87,7 @@ public class NamePlateQuotedParts(NamePlateStringField field, bool isFreeCompany
|
|||
sb.Append(isFreeCompany ? "»" : "》");
|
||||
}
|
||||
|
||||
if (this.OuterWrap is { Item2: var outerRight })
|
||||
if (this.OuterWrap is { Item2: { } outerRight })
|
||||
{
|
||||
sb.Append(outerRight);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class NamePlateSimpleParts(NamePlateStringField field)
|
|||
if ((nint)handler.GetFieldAsPointer(field) == NamePlateGui.EmptyStringPointer)
|
||||
return;
|
||||
|
||||
if (this.TextWrap is { Item1: var left, Item2: var right })
|
||||
if (this.TextWrap is { Item1: { } left, Item2: { } right })
|
||||
{
|
||||
var sb = new SeStringBuilder();
|
||||
sb.Append(left);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue