Ignore:
Timestamp:
2011-05-04T07:09:56+02:00 (15 years ago)
Author:
jttt
Message:

Fix #6301 Check for null mandatory in TableCellRenderer.getTableCellRendererComponent

File:
1 edited

Legend:

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

    r3970 r4072  
    563563                    boolean isSelected, boolean hasFocus, int row, int column) {
    564564                Component c = super.getTableCellRendererComponent(table, value, isSelected, false, row, column);
     565                if (value == null)
     566                    return this;
    565567                if (c instanceof JLabel) {
    566568                    String str = null;
     
    610612                    boolean isSelected, boolean hasFocus, int row, int column) {
    611613                Component c = super.getTableCellRendererComponent(table, value, isSelected, false, row, column);
     614                if (value == null)
     615                    return this;
    612616                if (c instanceof JLabel) {
    613617                    JLabel label = (JLabel)c;
     
    625629            @Override public Component getTableCellRendererComponent(JTable table, Object value,
    626630                    boolean isSelected, boolean hasFocus, int row, int column) {
     631                if (value == null)
     632                    return this;
    627633                Component c = super.getTableCellRendererComponent(table, value, isSelected, false, row, column);
    628634                boolean isDisabledAndHidden = (((Relation)table.getValueAt(row, 0))).isDisabledAndHidden();
Note: See TracChangeset for help on using the changeset viewer.