1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-12 11:35:21 +02:00

null pointer check

This commit is contained in:
David McKnight 2010-12-10 21:22:28 +00:00
parent 1913bde373
commit f6be2cde98

View file

@ -5954,12 +5954,13 @@ public class SystemView extends SafeTreeViewer
if (selection instanceof IStructuredSelection){
Object first = ((IStructuredSelection)selection).getFirstElement();
ISystemViewElementAdapter adapter = getViewAdapter(first);
if (adapter != null){
Object parent = adapter.getParent(first);
if (parent != null){
parentSelection = new StructuredSelection(parent);
}
}
}
SelectionChangedEvent dummyEvent = new SelectionChangedEvent(this, parentSelection);
SelectionChangedEvent event = new SelectionChangedEvent(this, selection);