Handle the case where the EditorPage does not contain any Editors

This commit is contained in:
Michael Becker 2019-08-03 12:44:24 -04:00
parent 9335d0fd6d
commit e94f8d2bdf

View File

@ -624,7 +624,9 @@ namespace UniversalEditor.UserInterface
if (page == null)
return null;
return (page.Controls[0] as Editor);
if (page.Controls.Count > 0)
return (page.Controls[0] as Editor);
return null;
}
public Pages.EditorPage GetCurrentEditorPage()
{