Changeset 4761 in josm


Ignore:
Timestamp:
Jan 4, 2012 8:33:06 AM (17 months ago)
Author:
jttt
Message:

Fix #7218 NPE after download with waydownloader

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java

    r4758 r4761  
    274274            @Override 
    275275            public void run() { 
    276                 dialog.setVisible(false); 
    277                 dialog.setCancelCallback(null); 
    278                 dialog.setInBackgroundCallback(null); 
    279                 dialog.removeWindowListener(windowListener); 
    280                 dialog.dispose(); 
    281                 dialog = null; 
    282                 MapFrame map = Main.map; 
    283                 if (map != null) { 
    284                     map.statusLine.progressMonitor.setVisible(false); 
    285                 } 
    286                 Main.currentProgressMonitor = null; 
     276                if (dialog != null) { 
     277                    dialog.setVisible(false); 
     278                    dialog.setCancelCallback(null); 
     279                    dialog.setInBackgroundCallback(null); 
     280                    dialog.removeWindowListener(windowListener); 
     281                    dialog.dispose(); 
     282                    dialog = null; 
     283                    Main.currentProgressMonitor = null; 
     284                    MapFrame map = Main.map; 
     285                    if (map != null) { 
     286                        map.statusLine.progressMonitor.setVisible(false); 
     287                    } 
     288                } 
    287289            } 
    288290        }); 
Note: See TracChangeset for help on using the changeset viewer.