mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: correctly handle null structs in Util.PrintOutObject
This commit is contained in:
parent
ca15a9c035
commit
71ed733874
1 changed files with 8 additions and 1 deletions
|
|
@ -186,7 +186,14 @@ namespace Dalamud.Utility
|
||||||
var eType = type.GetElementType();
|
var eType = type.GetElementType();
|
||||||
var ptrObj = SafeMemory.PtrToStructure(new IntPtr(unboxed), eType);
|
var ptrObj = SafeMemory.PtrToStructure(new IntPtr(unboxed), eType);
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
PrintOutObject(ptrObj, (ulong)unboxed, new List<string>(path));
|
if (ptrObj == null)
|
||||||
|
{
|
||||||
|
ImGui.Text("null or invalid");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PrintOutObject(ptrObj, (ulong)unboxed, new List<string>(path));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue