1
0
Fork 0
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:
Ken Ryall 2007-06-12 12:35:46 +00:00
parent 39afec683f
commit 3ddfd0b436

View file

@ -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);
}
}
}
}