From 4fff7dee5a89b30d38cac88ef250b8f9ff54250d Mon Sep 17 00:00:00 2001 From: nebel <9887+nebel@users.noreply.github.com> Date: Tue, 28 Oct 2025 09:20:31 +0900 Subject: [PATCH] Add more null checks to NamePlateUpdateHander.GameObject --- Dalamud/Game/Gui/NamePlate/NamePlateUpdateHandler.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Dalamud/Game/Gui/NamePlate/NamePlateUpdateHandler.cs b/Dalamud/Game/Gui/NamePlate/NamePlateUpdateHandler.cs index 185be9d24..e2b2e4191 100644 --- a/Dalamud/Game/Gui/NamePlate/NamePlateUpdateHandler.cs +++ b/Dalamud/Game/Gui/NamePlate/NamePlateUpdateHandler.cs @@ -340,9 +340,13 @@ internal unsafe class NamePlateUpdateHandler : INamePlateUpdateHandler return null; } - return this.gameObject ??= this.context.ObjectTable[ - this.context.Ui3DModule->NamePlateObjectInfoPointers[this.ArrayIndex] - .Value->GameObject->ObjectIndex]; + var objectInfoPtr = this.context.Ui3DModule->NamePlateObjectInfoPointers[this.ArrayIndex]; + if (objectInfoPtr.Value == null) return null; + + var gameObjectPtr = objectInfoPtr.Value->GameObject; + if (gameObjectPtr == null) return null; + + return this.gameObject ??= this.context.ObjectTable[gameObjectPtr->ObjectIndex]; } }