Skip to content
Snippets Groups Projects
Commit 5108ba3c authored by Simon Barner's avatar Simon Barner
Browse files

- Avoid potential cast error

refs 1841
parent dcaf54f4
No related branches found
No related tags found
No related merge requests found
......@@ -100,7 +100,7 @@ public abstract class AnnotationViewPartBase extends ViewPart implements ISelect
if(currentlySelectedObject == null) {
ElementEditPartBase<?> editPart =
SelectionUtils.checkAndPickFirst(selection, ElementEditPartBase.class);
if(editPart != null) {
if(editPart != null && editPart.getModel() instanceof IModelElement) {
currentlySelectedObject = (IModelElement)editPart.getModel();
} else {
// Not all editors are derived from ElementEditPartBase, most notably
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment