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;