Ticket #19240: 19240.patch

File 19240.patch, 1.0 KB (added by GerdP, 5 years ago)

do we need more than this?

  • src/org/openstreetmap/josm/tools/Territories.java

     
    127127    /**
    128128     * Initializes territories using the internal data only.
    129129     */
    130     public static void initializeInternalData() {
     130    public static synchronized void initializeInternalData() {
    131131        iso3166Cache = new HashMap<>();
    132132        taginfoCache = new TreeMap<>();
    133133        customTagsCache = new TreeMap<>();
     
    166166        } catch (IOException | IllegalDataException ex) {
    167167            throw new JosmRuntimeException(ex);
    168168        } finally {
    169             MultipolygonCache.getInstance().clear(dataSet);
     169            if (dataSet != null)
     170                MultipolygonCache.getInstance().clear(dataSet);
    170171            if (!Logging.isDebugEnabled()) {
    171172                // unset dataSet to save memory, see #18907
    172173                dataSet = null;