From da81c8e6fc6f47c3e950bea7f7136b95e9b225fa Mon Sep 17 00:00:00 2001 From: alcexhim Date: Tue, 21 Apr 2015 10:24:39 -0400 Subject: [PATCH] Handle case when DataFormat is null --- .../Dialogs/DocumentPropertiesDialog.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CSharp/Engines/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DocumentPropertiesDialog.cs b/CSharp/Engines/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DocumentPropertiesDialog.cs index ea637bd6..8bcbce63 100644 --- a/CSharp/Engines/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DocumentPropertiesDialog.cs +++ b/CSharp/Engines/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/Dialogs/DocumentPropertiesDialog.cs @@ -82,7 +82,14 @@ namespace UniversalEditor.UserInterface.WindowsForms.Dialogs if (mvarMode == DocumentPropertiesDialogMode.Save) { // show all dataformats for the current object model - omrs = UniversalEditor.Common.Reflection.GetAvailableObjectModels(mvarDataFormat.MakeReference()); + if (mvarDataFormat == null) + { + omrs = UniversalEditor.Common.Reflection.GetAvailableObjectModels(); + } + else + { + omrs = UniversalEditor.Common.Reflection.GetAvailableObjectModels(mvarDataFormat.MakeReference()); + } } else if (mvarMode == DocumentPropertiesDialogMode.Open) {