From d417a06db76f679bd4c40a78eb15bc28196bd386 Mon Sep 17 00:00:00 2001 From: Haselnussbomber Date: Tue, 17 Feb 2026 18:27:16 +0100 Subject: [PATCH] Fix crash on getting the FileName of ImageNodes --- .../Internal/UiDebug/Browsing/NodeTree.Image.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Image.cs b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Image.cs index 949197f50..8c9207f5d 100644 --- a/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Image.cs +++ b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Image.cs @@ -297,17 +297,11 @@ internal unsafe partial class ImageNodeTree : ResNodeTree } this.TexType = asset->AtkTexture.TextureType; + this.Texture = asset->AtkTexture.IsTextureReady() ? asset->AtkTexture.GetKernelTexture() : null; - if (this.TexType == Resource) + if (this.TexType == Resource && asset->AtkTexture.Resource != null && asset->AtkTexture.Resource->TexFileResourceHandle != null) { - var resource = asset->AtkTexture.Resource; - this.Texture = resource->KernelTextureObject; - this.Path = Marshal.PtrToStringAnsi(new(resource->TexFileResourceHandle->ResourceHandle.FileName.BufferPtr)); - } - else - { - this.Texture = this.TexType == KernelTexture ? asset->AtkTexture.KernelTexture : null; - this.Path = null; + this.Path = asset->AtkTexture.Resource->TexFileResourceHandle->ResourceHandle.FileName.ToString(); } this.HiRes = this.Path?.Contains("_hr1") ?? false;