diff --git a/Geodatenbezug/Processors/TopicProcessor.cs b/Geodatenbezug/Processors/TopicProcessor.cs index 64510ba..d70d4e1 100644 --- a/Geodatenbezug/Processors/TopicProcessor.cs +++ b/Geodatenbezug/Processors/TopicProcessor.cs @@ -223,6 +223,10 @@ public GdalLayer CreateGdalLayer(string layerName, Dictionary { var inputLayer = InputDataSource.GetLayerByName(layerName); + if (inputLayer == null) { + throw new InvalidOperationException($"Layer {layerName} not found in input data source"); + } + // Workaround https://github.com/blw-ofag-ufag/geodatenbezug_geodienste/issues/45 var geometryType = inputLayer.GetNextFeature().GetGeometryRef().GetGeometryType();