From 4df124440e59782ff24e333cf1a4b6a9a8a545e3 Mon Sep 17 00:00:00 2001 From: goat Date: Thu, 18 Jul 2024 00:34:57 +0200 Subject: [PATCH] dtr: null-check storage when removing --- Dalamud/Game/Gui/Dtr/DtrBar.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dalamud/Game/Gui/Dtr/DtrBar.cs b/Dalamud/Game/Gui/Dtr/DtrBar.cs index 0cb5bde88..2d8bb064b 100644 --- a/Dalamud/Game/Gui/Dtr/DtrBar.cs +++ b/Dalamud/Game/Gui/Dtr/DtrBar.cs @@ -146,8 +146,12 @@ internal sealed unsafe class DtrBar : IInternalDisposableService, IDtrBar internal void RemoveEntry(DtrBarEntry toRemove) { this.RemoveNode(toRemove.TextNode); - toRemove.Storage->Dtor(true); - toRemove.Storage = null; + + if (toRemove.Storage != null) + { + toRemove.Storage->Dtor(true); + toRemove.Storage = null; + } } ///