Handle case when DataFormat is null

This commit is contained in:
Michael Becker 2015-04-21 10:24:39 -04:00
parent b3e0d52c57
commit da81c8e6fc

View File

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