Changeset 35730 in osm for applications/viewer
- Timestamp:
- 2021-03-16T18:45:07+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxTree.java
r34763 r35730 4 4 import java.awt.BorderLayout; 5 5 import java.awt.event.MouseAdapter; 6 import java.util.Objects; 6 7 7 8 import javax.swing.JFrame; … … 151 152 for (int i = 0; i < node.getChildCount(); i++) { 152 153 DefaultMutableTreeNode childNode = node(node.getChildAt(i)); 153 if (!data(childNode).isSelected().equals(data(node).isSelected())) { 154 // Fix NPE from #20557 155 final CheckBoxNodeData childData = data(childNode); 156 final CheckBoxNodeData nodeData = data(node); 157 if (childData != null && nodeData != null && 158 !Objects.equals(childData.isSelected(), nodeData.isSelected())) { 154 159 data(childNode).setSelected(data(node).isSelected()); 155 160 setChildrens(childNode, value);
Note:
See TracChangeset
for help on using the changeset viewer.