From 74b50fbc42a755bdb26631422900fc3d4a023d80 Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Sun, 10 May 2020 01:57:20 -0400 Subject: [PATCH] we cannot yet bookmark a file that does not yet exist --- Libraries/UniversalEditor.UserInterface/Engine.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Libraries/UniversalEditor.UserInterface/Engine.cs b/Libraries/UniversalEditor.UserInterface/Engine.cs index 0401dd39..9c2be56a 100644 --- a/Libraries/UniversalEditor.UserInterface/Engine.cs +++ b/Libraries/UniversalEditor.UserInterface/Engine.cs @@ -542,6 +542,9 @@ namespace UniversalEditor.UserInterface Editor ed = LastWindow.GetCurrentEditor(); if (ed == null) return; + // we cannot yet bookmark a file that does not yet exist. (this would be akin to creating a shortcut to a template I guess...?) + if (ed.ObjectModel.Accessor == null) return; + // FIXME: BookmarksAdd copypasta string filename = ed.ObjectModel.Accessor.GetFileName(); BookmarksManager.FileNames.Add(filename);