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

View file

@ -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 {
} }
} }
} }
}
} }
} }