Merge pull request #24 from H4CK3R-01/app-source-code

Small bug fix
This commit is contained in:
Florian Kaiser 2022-05-06 08:35:51 +02:00 committed by GitHub
commit 74481f7394
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1873,7 +1873,7 @@ namespace Aml.Editor.Plugin
IEnumerable<PackagePart> 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();
@ -4496,7 +4496,7 @@ namespace Aml.Editor.Plugin
}
else
{
this.advancedModeToolStripMenuItem.Text = "Expert mode";
this.advancedModeToolStripMenuItem.Text = "Advanced mode";
}
// Show/hide elements