we cannot yet bookmark a file that does not yet exist

This commit is contained in:
Michael Becker 2020-05-10 01:57:20 -04:00
parent d129565329
commit 74b50fbc42
No known key found for this signature in database
GPG Key ID: 506F54899E2BFED7

View File

@ -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);