mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 14:55:41 +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,6 +214,8 @@ public class ChangeBuildConfigActionBase {
|
||||||
if (part instanceof IEditorPart) {
|
if (part instanceof IEditorPart) {
|
||||||
IEditorPart epart = (IEditorPart) part;
|
IEditorPart epart = (IEditorPart) part;
|
||||||
IResource resource = (IResource) epart.getEditorInput().getAdapter(IResource.class);
|
IResource resource = (IResource) epart.getEditorInput().getAdapter(IResource.class);
|
||||||
|
if (resource != null)
|
||||||
|
{
|
||||||
IProject project = resource.getProject();
|
IProject project = resource.getProject();
|
||||||
badObject = !(project != null && CoreModel.getDefault().isNewStyleProject(project));
|
badObject = !(project != null && CoreModel.getDefault().isNewStyleProject(project));
|
||||||
|
|
||||||
|
@ -224,6 +226,7 @@ public class ChangeBuildConfigActionBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue