Changeset 9319 in josm for trunk


Ignore:
Timestamp:
2016-01-05T14:38:39+01:00 (9 years ago)
Author:
simon04
Message:

fix #12298 - ArrayIndexOutOfBoundsException when adding tag to empty TagTable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java

    r9231 r9319  
    298298            }
    299299            final int rowIdx = model.getRowCount()-1;
    300             String key = ((TagModel) model.getValueAt(rowIdx, 0)).getName();
    301             if (!key.trim().isEmpty()) {
     300            if (rowIdx < 0 || !((TagModel) model.getValueAt(rowIdx, 0)).getName().trim().isEmpty()) {
    302301                model.appendNewTag();
    303302            }
Note: See TracChangeset for help on using the changeset viewer.