From dc78a506eb19b0d0b460c35929f3219ebc3f1d6c Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Mon, 7 Feb 2022 13:12:18 -0500 Subject: [PATCH] fix minor bug with null project templates --- .../UniversalEditor.UserInterface/EditorWindow.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Libraries/UniversalEditor.UserInterface/EditorWindow.cs b/Libraries/UniversalEditor.UserInterface/EditorWindow.cs index a687cc3b..180870dd 100644 --- a/Libraries/UniversalEditor.UserInterface/EditorWindow.cs +++ b/Libraries/UniversalEditor.UserInterface/EditorWindow.cs @@ -607,7 +607,16 @@ namespace UniversalEditor.UserInterface solution.Title = dlg.SolutionTitle; } - ProjectObjectModel project = pjt.Create(); + ProjectObjectModel project = null; + if (pjt == null) + { + project = new ProjectObjectModel(); + Console.Error.WriteLine("NULL project templates should be deprecated; replace with actual Empty Project template"); + } + else + { + project = pjt.Create(); + } project.ID = Guid.NewGuid(); project.Title = dlg.ProjectTitle;