mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +02:00
Fix NPE, bug 191985.
This commit is contained in:
parent
39afec683f
commit
3ddfd0b436
1 changed files with 7 additions and 4 deletions
|
@ -214,11 +214,14 @@ public class ChangeBuildConfigActionBase {
|
|||
if (part instanceof IEditorPart) {
|
||||
IEditorPart epart = (IEditorPart) part;
|
||||
IResource resource = (IResource) epart.getEditorInput().getAdapter(IResource.class);
|
||||
IProject project = resource.getProject();
|
||||
badObject = !(project != null && CoreModel.getDefault().isNewStyleProject(project));
|
||||
if (resource != null)
|
||||
{
|
||||
IProject project = resource.getProject();
|
||||
badObject = !(project != null && CoreModel.getDefault().isNewStyleProject(project));
|
||||
|
||||
if (!badObject) {
|
||||
fProjects.add(project);
|
||||
if (!badObject) {
|
||||
fProjects.add(project);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue