mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 13:14:17 +01:00
fix for at least some of the actor table crashing
This commit is contained in:
parent
4d18a063f7
commit
2bef760f71
1 changed files with 28 additions and 19 deletions
|
|
@ -65,6 +65,14 @@ namespace Dalamud.Interface
|
|||
break;
|
||||
case 2: {
|
||||
var stateString = string.Empty;
|
||||
// LocalPlayer is null in a number of situations (at least with the current visible-actors list)
|
||||
// which would crash here.
|
||||
if (this.dalamud.ClientState.Actors.Length == 0 || this.dalamud.ClientState.LocalPlayer == null)
|
||||
{
|
||||
ImGui.TextUnformatted("Data not ready.");
|
||||
}
|
||||
else
|
||||
{
|
||||
stateString += $"FrameworkBase: {this.dalamud.Framework.Address.BaseAddress.ToInt64():X}\n";
|
||||
|
||||
stateString += $"ActorTableLen: {this.dalamud.ClientState.Actors.Length}\n";
|
||||
|
|
@ -89,6 +97,7 @@ namespace Dalamud.Interface
|
|||
$" Level: {chara.Level} ClassJob: {chara.ClassJob.GameData.Name} CHP: {chara.CurrentHp} MHP: {chara.MaxHp} CMP: {chara.CurrentMp} MMP: {chara.MaxMp}\n";
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
ImGui.TextUnformatted(stateString);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue