diff --git a/SOURCE/Plugin/MWData.cs b/SOURCE/Plugin/MWData.cs index 58554fa..28f95c9 100644 --- a/SOURCE/Plugin/MWData.cs +++ b/SOURCE/Plugin/MWData.cs @@ -80,7 +80,7 @@ namespace Aml.Editor.Plugin IEnumerable rootParts = amlx.GetPartsByRelationShipType(AutomationMLContainer.RelationshipType.Root); // We expect the aml to only have one root part - if (rootParts.First() != null) + if (rootParts.Count() != 0 && rootParts.First() != null) { PackagePart part = rootParts.First();