From c3fc908a68e49820842481d828a3680081a8fbdb Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Sat, 27 Feb 2021 08:35:50 -0500 Subject: [PATCH] this fires when we switch away from an Editor, so don't crash --- .../Panels/DocumentExplorerPanel.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Libraries/UniversalEditor.UserInterface/Panels/DocumentExplorerPanel.cs b/Libraries/UniversalEditor.UserInterface/Panels/DocumentExplorerPanel.cs index f1e05f45..54b198fe 100644 --- a/Libraries/UniversalEditor.UserInterface/Panels/DocumentExplorerPanel.cs +++ b/Libraries/UniversalEditor.UserInterface/Panels/DocumentExplorerPanel.cs @@ -46,6 +46,9 @@ namespace UniversalEditor.UserInterface.Panels if (lv.SelectedRows.Count == 0) return; + if (CurrentEditor == null) + return; + EditorDocumentExplorerNode node = lv.SelectedRows[0].GetExtraData("node"); CurrentEditor.OnDocumentExplorerSelectionChanged(new EditorDocumentExplorerSelectionChangedEventArgs(node)); }