Fixed null errors
This commit is contained in:
@@ -910,8 +910,6 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
|
|||||||
bool useVanityColors = false;
|
bool useVanityColors = false;
|
||||||
Vector4? vanityTextColor = null;
|
Vector4? vanityTextColor = null;
|
||||||
Vector4? vanityGlowColor = null;
|
Vector4? vanityGlowColor = null;
|
||||||
if (_groupData is not null && groupInfo is not null)
|
|
||||||
{
|
|
||||||
string primaryHeaderText = _groupData.AliasOrGID;
|
string primaryHeaderText = _groupData.AliasOrGID;
|
||||||
|
|
||||||
List<(string Text, bool UseVanityColor, bool Disabled)> secondaryHeaderLines =
|
List<(string Text, bool UseVanityColor, bool Disabled)> secondaryHeaderLines =
|
||||||
@@ -919,8 +917,10 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
|
|||||||
(_groupData.GID, false, true)
|
(_groupData.GID, false, true)
|
||||||
];
|
];
|
||||||
|
|
||||||
if (groupInfo.Owner is not null)
|
if (groupInfo is not null)
|
||||||
secondaryHeaderLines.Add(($"Owner: {groupInfo.Owner.AliasOrUID}", false, true));
|
secondaryHeaderLines.Add(($"Owner: {groupInfo.Owner.AliasOrUID}", false, true));
|
||||||
|
else
|
||||||
|
secondaryHeaderLines.Add(($"Unknown Owner", false, true));
|
||||||
|
|
||||||
var infoStartY = MathF.Max(contentStartY, bannerHeight + style.WindowPadding.Y);
|
var infoStartY = MathF.Max(contentStartY, bannerHeight + style.WindowPadding.Y);
|
||||||
var aliasColumnX = infoOffsetX + 18f * scale;
|
var aliasColumnX = infoOffsetX + 18f * scale;
|
||||||
@@ -969,7 +969,9 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
|
|||||||
|
|
||||||
var descriptionSeparatorSpacing = style.ItemSpacing.Y * 0.35f;
|
var descriptionSeparatorSpacing = style.ItemSpacing.Y * 0.35f;
|
||||||
var descriptionSeparatorThickness = MathF.Max(1f, scale);
|
var descriptionSeparatorThickness = MathF.Max(1f, scale);
|
||||||
var descriptionExtraOffset = groupInfo.Owner is not null ? style.ItemSpacing.Y * 0.6f : 0f;
|
var descriptionExtraOffset = 0f;
|
||||||
|
if (groupInfo?.Owner is not null)
|
||||||
|
descriptionExtraOffset = style.ItemSpacing.Y * 0.6f;
|
||||||
var descriptionStartLocal = new Vector2(aliasColumnX, aliasAndTagsBottomLocal + descriptionSeparatorSpacing + descriptionExtraOffset);
|
var descriptionStartLocal = new Vector2(aliasColumnX, aliasAndTagsBottomLocal + descriptionSeparatorSpacing + descriptionExtraOffset);
|
||||||
var horizontalInset = style.ItemSpacing.X * 0.5f;
|
var horizontalInset = style.ItemSpacing.X * 0.5f;
|
||||||
var descriptionSeparatorStart = windowPos + new Vector2(aliasColumnX - horizontalInset, descriptionStartLocal.Y);
|
var descriptionSeparatorStart = windowPos + new Vector2(aliasColumnX - horizontalInset, descriptionStartLocal.Y);
|
||||||
@@ -1079,7 +1081,6 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
|
|||||||
Size = finalSize;
|
Size = finalSize;
|
||||||
ImGui.SetWindowSize(finalSize, ImGuiCond.Always);
|
ImGui.SetWindowSize(finalSize, ImGuiCond.Always);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private IDalamudTextureWrap? GetBannerTexture(byte[] bannerBytes)
|
private IDalamudTextureWrap? GetBannerTexture(byte[] bannerBytes)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user