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:
parent
1913bde373
commit
f6be2cde98
1 changed files with 5 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue