Ignore:
Timestamp:
2016-10-30T00:11:11+02:00 (7 years ago)
Author:
wiktorn
Message:

Allow working on readonly JOSM Home

Return null CachedTileLoaderFactory when cache creation fails.
Adapt SlippyMapBBoxChooser so it uses un-cached loader when cached is unavailable.

Closes: #13786

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/AbstractCachedTileSourceLayer.java

    r9860 r11188  
    113113     */
    114114    public static TileLoaderFactory getTileLoaderFactory(String name, Class<? extends TileLoader> klazz) {
    115         return new CachedTileLoaderFactory(getCache(name), klazz);
     115        CacheAccess<String, BufferedImageCacheEntry> cache = getCache(name);
     116        if (cache == null) {
     117            return null;
     118        }
     119        return new CachedTileLoaderFactory(cache, klazz);
    116120    }
    117121
Note: See TracChangeset for help on using the changeset viewer.