From addcead8c3fb63935a51a23e8d08a959903900c6 Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Thu, 19 Sep 2024 01:36:42 +0200 Subject: [PATCH] Avoid NPE when shape file is accessed before download. --- .../bertriksikken/verkeersdrukte/traffic/TrafficHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/verkeersdrukte/src/main/java/nl/bertriksikken/verkeersdrukte/traffic/TrafficHandler.java b/verkeersdrukte/src/main/java/nl/bertriksikken/verkeersdrukte/traffic/TrafficHandler.java index 80ddeb0..fd80d67 100644 --- a/verkeersdrukte/src/main/java/nl/bertriksikken/verkeersdrukte/traffic/TrafficHandler.java +++ b/verkeersdrukte/src/main/java/nl/bertriksikken/verkeersdrukte/traffic/TrafficHandler.java @@ -38,7 +38,8 @@ public final class TrafficHandler implements ITrafficHandler, Managed { private final NdwClient ndwClient; private final MeasurementCache measurementCache; private final ShapeFileDownloader shapeFileDownloader; - private FeatureCollection shapeFile; + + private FeatureCollection shapeFile = new FeatureCollection(); public TrafficHandler(VerkeersDrukteAppConfig config) { ndwClient = NdwClient.create(config.getNdwConfig());