Changeset 14097 in josm for trunk


Ignore:
Timestamp:
2018-08-05T23:00:17+02:00 (10 months ago)
Author:
Don-vip
Message:

fix NPE seen in unit tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r13959 r14097  
    809809                boolean isSelected, boolean hasFocus, int row, int column) {
    810810            Component c = super.getTableCellRendererComponent(table, value, isSelected, false, row, column);
    811             boolean isDisabledAndHidden = ((IRelation<?>) table.getValueAt(row, 0)).isDisabledAndHidden();
     811            IRelation<?> relation = (IRelation<?>) table.getValueAt(row, 0);
     812            boolean isDisabledAndHidden = relation != null && relation.isDisabledAndHidden();
    812813            if (c instanceof JLabel) {
    813814                JLabel label = (JLabel) c;
Note: See TracChangeset for help on using the changeset viewer.