mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[mike] fix NPE on creating new project with empty config dir
This commit is contained in:
@@ -30,8 +30,10 @@ public class DefaultProjectStoreImpl extends ProjectStoreImpl {
|
||||
myElement = projectManager.getDefaultProjectRootElement();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
Element getStateCopy() {
|
||||
return (Element)myProjectManager.getDefaultProjectRootElement().clone();
|
||||
final Element element = myProjectManager.getDefaultProjectRootElement();
|
||||
return element != null ? (Element)element.clone() : null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -302,7 +302,9 @@ class ProjectStoreImpl extends BaseFileConfigurableStoreImpl implements IProject
|
||||
assert projectStore instanceof DefaultProjectStoreImpl;
|
||||
DefaultProjectStoreImpl defaultProjectStore = (DefaultProjectStoreImpl)projectStore;
|
||||
final Element element = defaultProjectStore.getStateCopy();
|
||||
xmlElementStorage.setDefaultState(element);
|
||||
if (element != null) {
|
||||
xmlElementStorage.setDefaultState(element);
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user