diff --git a/src/AasxCsharpLibrary/Extensions/ExtendEnvironment.cs b/src/AasxCsharpLibrary/Extensions/ExtendEnvironment.cs index 161cb165..6471a37c 100644 --- a/src/AasxCsharpLibrary/Extensions/ExtendEnvironment.cs +++ b/src/AasxCsharpLibrary/Extensions/ExtendEnvironment.cs @@ -603,6 +603,9 @@ public static IConceptDescription FindConceptDescriptionById( if (string.IsNullOrEmpty(cdId)) return null; + if (env.ConceptDescriptions == null || env.ConceptDescriptions.Count == 0) + return null; + var conceptDescription = env.ConceptDescriptions.Where(c => c.Id.Equals(cdId)).FirstOrDefault(); return conceptDescription; }