Ignore:
Timestamp:
2010-02-01T00:00:01+01:00 (15 years ago)
Author:
pieren
Message:

Fix a null pointer exception

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java

    r19387 r19702  
    9999    public void destroy() {
    100100        // if the layer is currently saving the images in the cache, wait until it's finished
    101         while (!cacheControl.isCachePipeEmpty()) {
    102             System.out.println("Try to close a WMSLayer which is currently saving in cache : wait 1 sec.");
    103             CadastrePlugin.safeSleep(1000);
     101        if (cacheControl != null) {
     102            while (!cacheControl.isCachePipeEmpty()) {
     103                System.out.println("Try to close a WMSLayer which is currently saving in cache : wait 1 sec.");
     104                CadastrePlugin.safeSleep(1000);
     105            }
    104106        }
    105107        super.destroy();
Note: See TracChangeset for help on using the changeset viewer.