Revision 32ca3eb7
Added by Katja Luther about 3 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/CdmCheckBoxTreeViewer.java | ||
---|---|---|
30 | 30 |
protected void handleTreeExpand(TreeEvent event) { |
31 | 31 |
|
32 | 32 |
super.handleTreeExpand(event); |
33 |
this.setCheckedElements(((CheckBoxTreeComposite)this.getControl().getParent()).checkedElements); |
|
33 |
if (((CheckBoxTreeComposite)this.getControl().getParent()).checkedElements != null){ |
|
34 |
this.setCheckedElements(((CheckBoxTreeComposite)this.getControl().getParent()).checkedElements); |
|
35 |
} |
|
34 | 36 |
|
35 | 37 |
} |
36 | 38 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/CheckBoxTreeComposite.java | ||
---|---|---|
98 | 98 |
} |
99 | 99 |
|
100 | 100 |
if (item.getChecked()){ |
101 |
Object[] tempArray = Arrays.copyOf(checkedElements, checkedElements.length +1); |
|
102 |
tempArray[checkedElements.length] = item.getData(); |
|
103 |
checkedElements = tempArray; |
|
101 |
if (checkedElements != null){ |
|
102 |
Object[] tempArray = Arrays.copyOf(checkedElements, checkedElements.length +1); |
|
103 |
tempArray[checkedElements.length] = item.getData(); |
|
104 |
checkedElements = tempArray; |
|
105 |
} |
|
104 | 106 |
|
105 | 107 |
}else{ |
106 | 108 |
int index = 0; |
Also available in: Unified diff
ref #9466: avoid NPE