From ffbeeba929c462038a462ab1e674f084104154b6 Mon Sep 17 00:00:00 2001 From: defnotken Date: Sat, 11 Oct 2025 16:39:37 -0500 Subject: [PATCH] more null checks for nameplates. --- LightlessSync/Services/NameplateHandler.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/LightlessSync/Services/NameplateHandler.cs b/LightlessSync/Services/NameplateHandler.cs index 024c500..dc761bb 100644 --- a/LightlessSync/Services/NameplateHandler.cs +++ b/LightlessSync/Services/NameplateHandler.cs @@ -221,6 +221,9 @@ public unsafe class NameplateHandler : IMediatorSubscriber if (pNode == null) continue; + if (mpNameplateAddon == null) + continue; + var cid = DalamudUtilService.GetHashedCIDFromPlayerPointer((nint)objectInfo->GameObject); if (cid == null || !_activeBroadcastingCids.Contains(cid)) @@ -250,6 +253,14 @@ public unsafe class NameplateHandler : IMediatorSubscriber bool IsVisible = pNameplateIconNode->AtkResNode.IsVisible() || (pNameplateResNode->IsVisible() && pNameplateTextNode->AtkResNode.IsVisible()) || _configService.Current.LightfinderLabelShowHidden; pNode->AtkResNode.ToggleVisibility(IsVisible); + if (nameplateObject.RootComponentNode == null || + nameplateObject.NameContainer == null || + nameplateObject.NameText == null) + { + pNode->AtkResNode.ToggleVisibility(false); + continue; + } + var nameContainer = nameplateObject.NameContainer; var nameText = nameplateObject.NameText;