1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-02 22:55:26 +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,10 +5954,11 @@ public class SystemView extends SafeTreeViewer
if (selection instanceof IStructuredSelection){
Object first = ((IStructuredSelection)selection).getFirstElement();
ISystemViewElementAdapter adapter = getViewAdapter(first);
Object parent = adapter.getParent(first);
if (parent != null){
parentSelection = new StructuredSelection(parent);
if (adapter != null){
Object parent = adapter.getParent(first);
if (parent != null){
parentSelection = new StructuredSelection(parent);
}
}
}