Ignore:
Timestamp:
2015-10-27T23:19:34+01:00 (4 years ago)
Author:
Don-vip
Message:

fix #12019 - NPE with ChangePropertyCommand called on objects without dataset - regression from r8941

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java

    r8945 r8961  
    111111            return true;
    112112        final DataSet dataSet = objects.get(0).getDataSet();
    113         dataSet.beginUpdate();
     113        if (dataSet != null) {
     114            dataSet.beginUpdate();
     115        }
    114116        try {
    115117            super.executeCommand(); // save old
     
    133135            return true;
    134136        } finally {
    135             dataSet.endUpdate();
     137            if (dataSet != null) {
     138                dataSet.endUpdate();
     139            }
    136140        }
    137141    }
Note: See TracChangeset for help on using the changeset viewer.