1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

- fixed NPE in prefernces page

This commit is contained in:
Alena Laskavaia 2010-04-07 01:35:07 +00:00
parent 80fa0c1930
commit aae25439d2

View file

@ -120,6 +120,7 @@ public abstract class FieldEditorOverlayPage extends FieldEditorPreferencePage
* @see org.eclipse.ui.IWorkbenchPropertyPage#getElement()
*/
public IAdaptable getElement() {
if (element==null) return element;
if (!(element instanceof IProject))
return (IAdaptable) element.getAdapter(IProject.class);
return element;