Merge pull request #2442 from nebel/nameplate-gameobj-more-null-checks
Some checks are pending
Build Dalamud / Build on Windows (push) Waiting to run
Build Dalamud / Check API Compatibility (push) Blocked by required conditions
Build Dalamud / Deploy dalamud-distrib staging (push) Blocked by required conditions
Tag Build / Tag Build (push) Successful in 4s

Add more null checks to NamePlateUpdateHander.GameObject
This commit is contained in:
goat 2025-10-28 19:12:08 +01:00 committed by GitHub
commit 31340dda84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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];
}
}