diff options
Diffstat (limited to 'src/main/java/org/traccar/geocoder/JsonGeocoder.java')
-rw-r--r-- | src/main/java/org/traccar/geocoder/JsonGeocoder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/geocoder/JsonGeocoder.java b/src/main/java/org/traccar/geocoder/JsonGeocoder.java index 3cd5b596e..f20aa79d6 100644 --- a/src/main/java/org/traccar/geocoder/JsonGeocoder.java +++ b/src/main/java/org/traccar/geocoder/JsonGeocoder.java @@ -97,7 +97,9 @@ public abstract class JsonGeocoder implements Geocoder { } } - Main.getInjector().getInstance(StatisticsManager.class).registerGeocoderRequest(); + if (Main.getInjector() != null) { + Main.getInjector().getInstance(StatisticsManager.class).registerGeocoderRequest(); + } Invocation.Builder request = Context.getClient().target(String.format(url, latitude, longitude)).request(); |