Ignore:
Timestamp:
2010-08-21T19:01:16+02:00 (14 years ago)
Author:
jttt
Message:

Fix #5357 JOSM blocks due to WMS-Plugin / unhandled exception

Location:
applications/editors/josm/plugins/wmsplugin/src/wmsplugin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Grabber.java

    r22712 r22720  
    7070                                attempt(request);
    7171                        }
    72                         if (canceled) {
    73                                 return;
     72                        if (request.getState() != null) {
     73                                layer.finishRequest(request);
     74                                mv.repaint();
    7475                        }
    75                         layer.finishRequest(request);
    76                         mv.repaint();
    7776                }
    7877        }
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java

    r22712 r22720  
    412412
    413413        public void finishRequest(WMSRequest request) {
     414                if (request.getState() == null) {
     415                        throw new IllegalArgumentException("Finished request without state");
     416                }
    414417                requestQueueLock.lock();
    415418                try {
     
    445448                                }
    446449                        }
     450                } finally {
    447451                        finishedRequests.clear();
    448                 } finally {
    449452                        requestQueueLock.unlock();
    450453                }
Note: See TracChangeset for help on using the changeset viewer.