Skip to content

Commit b3ba2de

Browse files
committed
fixes #91
1 parent 3d5f32f commit b3ba2de

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

eclipse-plugin/eclipse/cc.codechecker.eclipse.plugin/src/cc/codechecker/plugin/init/ProjectExplorerSelectionListener.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ public void selectionChanged(IWorkbenchPart part, ISelection selection) {
1818
Object element = ((IStructuredSelection) selection).getFirstElement();
1919
if(element instanceof IAdaptable) {
2020
IResource resource = (IResource)((IAdaptable) element).getAdapter(IResource.class);
21-
final IProject project = resource.getProject();
22-
CodeCheckerContext.getInstance().refreshChangeProject(project);
21+
if (resource!=null){
22+
final IProject project = resource.getProject();
23+
if (project!=null)
24+
CodeCheckerContext.getInstance().refreshChangeProject(project);
25+
}
2326
}
2427
}
2528
}

0 commit comments

Comments
 (0)