Revision 97542d84
Added by Patrick Plitzner over 7 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmDataViewer.java | ||
---|---|---|
113 | 113 |
/** {@inheritDoc} */ |
114 | 114 |
@Override |
115 | 115 |
public Control getControl() { |
116 |
if(body.isDisposed()){ |
|
117 |
return null; |
|
118 |
} |
|
116 | 119 |
for(Control child : body.getChildren()){ |
117 | 120 |
return child; |
118 | 121 |
} |
119 | 122 |
|
120 | 123 |
return body; |
121 | 124 |
} |
122 |
|
|
125 |
|
|
123 | 126 |
/* (non-Javadoc) |
124 | 127 |
* @see org.eclipse.jface.viewers.Viewer#setInput(java.lang.Object) |
125 | 128 |
*/ |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmViewPart.java | ||
---|---|---|
110 | 110 |
|
111 | 111 |
Object element = selection.getFirstElement(); |
112 | 112 |
//avoid widget is disposed exceptions |
113 |
if (getViewer().getControl().isDisposed()){ |
|
113 |
if (getViewer().getControl()==null || getViewer().getControl().isDisposed()){
|
|
114 | 114 |
return; |
115 | 115 |
} |
116 | 116 |
getViewer().setInput(element); |
Also available in: Unified diff
Fix potential Widget is disposed exception