mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Don't allow nameplate GameObject lookup when ObjectId is invalid (#2137)
This commit is contained in:
parent
4c62158aea
commit
75f414578d
1 changed files with 16 additions and 3 deletions
|
|
@ -328,9 +328,22 @@ internal unsafe class NamePlateUpdateHandler : INamePlateUpdateHandler
|
|||
public ulong GameObjectId => this.gameObjectId ??= this.NamePlateInfo->ObjectId;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IGameObject? GameObject => this.gameObject ??= this.context.ObjectTable[
|
||||
this.context.Ui3DModule->NamePlateObjectInfoPointers[this.ArrayIndex]
|
||||
.Value->GameObject->ObjectIndex];
|
||||
public IGameObject? GameObject
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.GameObjectId == 0xE0000000)
|
||||
{
|
||||
// Skipping Ui3DModule lookup for invalid nameplate (NamePlateInfo->ObjectId is 0xE0000000). This
|
||||
// prevents crashes around certain Doman Reconstruction cutscenes.
|
||||
return null;
|
||||
}
|
||||
|
||||
return this.gameObject ??= this.context.ObjectTable[
|
||||
this.context.Ui3DModule->NamePlateObjectInfoPointers[this.ArrayIndex]
|
||||
.Value->GameObject->ObjectIndex];
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IBattleChara? BattleChara => this.GameObject as IBattleChara;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue