From f6f7fd7d05cb6299cbc3b832516410901afd797a Mon Sep 17 00:00:00 2001 From: H4CK3R-01 Date: Thu, 5 May 2022 18:19:42 +0200 Subject: [PATCH] Check length of IEnumerable --- SOURCE/Plugin/MWData.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();