From 3e446aa35f6d4961817db1e981e28958b1cf1bd3 Mon Sep 17 00:00:00 2001 From: ElektroKill Date: Sun, 17 Nov 2024 20:25:13 +0100 Subject: [PATCH] Fix a NRE that occured when navigating tabs --- Extensions/dnSpy.BamlDecompiler/BamlTabSaver.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Extensions/dnSpy.BamlDecompiler/BamlTabSaver.cs b/Extensions/dnSpy.BamlDecompiler/BamlTabSaver.cs index 9cf3660325..951f02395f 100644 --- a/Extensions/dnSpy.BamlDecompiler/BamlTabSaver.cs +++ b/Extensions/dnSpy.BamlDecompiler/BamlTabSaver.cs @@ -54,6 +54,8 @@ public static BamlTabSaver TryCreate(IDocumentTab tab, IMessageBoxService messag return null; if (tab.UIContext is not IDocumentViewer uiContext) return null; + if (tab.Content is null) + return null; var nodes = tab.Content.Nodes.ToArray(); if (nodes.Length != 1) return null;