mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: GetType safely
This commit is contained in:
parent
287c7c8a78
commit
cb78329f1d
1 changed files with 2 additions and 1 deletions
|
|
@ -175,7 +175,8 @@ namespace Dalamud.Utility
|
|||
foreach (var propertyInfo in type.GetProperties())
|
||||
{
|
||||
var value = propertyInfo.GetValue(obj);
|
||||
if (value.GetType() == typeof(IntPtr))
|
||||
var valueType = value?.GetType();
|
||||
if (valueType == typeof(IntPtr))
|
||||
ImGui.TextColored(ImGuiColors.DalamudOrange, $" {propertyInfo.Name}: 0x{value:X}");
|
||||
else
|
||||
ImGui.TextColored(ImGuiColors.DalamudOrange, $" {propertyInfo.Name}: {value}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue