Changeset 5955 in josm


Ignore:
Timestamp:
2013-05-11T01:53:05+02:00 (11 years ago)
Author:
Don-vip
Message:

avoid NPE when a fatal error occurs before main GUI as been created

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java

    r5886 r5955  
    9999            text.append("\n");
    100100        }
    101         DataSet dataset = Main.main.getCurrentDataSet();
    102         if (dataset != null) {
    103             String result = DatasetConsistencyTest.runTests(dataset);
    104             if (result.length() == 0) {
    105                 text.append("Dataset consistency test: No problems found\n");
    106             } else {
    107                 text.append("\nDataset consistency test:\n"+result+"\n");
     101        if (Main.main != null) {
     102            DataSet dataset = Main.main.getCurrentDataSet();
     103            if (dataset != null) {
     104                String result = DatasetConsistencyTest.runTests(dataset);
     105                if (result.length() == 0) {
     106                    text.append("Dataset consistency test: No problems found\n");
     107                } else {
     108                    text.append("\nDataset consistency test:\n"+result+"\n");
     109                }
    108110            }
    109111        }
Note: See TracChangeset for help on using the changeset viewer.