diff --git a/Libraries/UniversalEditor.UserInterface/MainWindow.cs b/Libraries/UniversalEditor.UserInterface/MainWindow.cs index 6fa7f8e1..caad510b 100644 --- a/Libraries/UniversalEditor.UserInterface/MainWindow.cs +++ b/Libraries/UniversalEditor.UserInterface/MainWindow.cs @@ -1190,7 +1190,8 @@ namespace UniversalEditor.UserInterface public void PrintDocument() { Editor editor = GetCurrentEditor (); - if (editor != null) { + if (editor != null) + { PrintHandlerReference[] phrs = UniversalEditor.Printing.Reflection.GetAvailablePrintHandlers(editor.ObjectModel); if (phrs.Length > 0) { @@ -1210,6 +1211,10 @@ namespace UniversalEditor.UserInterface } } } + else + { + MessageDialog.ShowDialog(String.Format("No print handlers are associated with the ObjectModel.\r\n\r\n{0}", editor.ObjectModel?.GetType()?.FullName ?? "(null)"), "Print Document", MessageDialogButtons.OK, MessageDialogIcon.Error); + } } }