Fix Already Disposed Exception EA-108721

This commit is contained in:
Kirill Likhodedov
2017-10-06 22:22:42 +03:00
parent 7be6b2384f
commit bfd94306af
@@ -295,8 +295,9 @@ public class DvcsUtil {
}
}
@CalledInAwt
public static void addMappingIfSubRoot(@NotNull Project project, @NotNull String newRepositoryPath, @NotNull String vcsName) {
if (project.getBasePath() != null && FileUtil.isAncestor(project.getBasePath(), newRepositoryPath, true)) {
if (!project.isDisposed() && project.getBasePath() != null && FileUtil.isAncestor(project.getBasePath(), newRepositoryPath, true)) {
ProjectLevelVcsManager manager = ProjectLevelVcsManager.getInstance(project);
manager.setDirectoryMappings(VcsUtil.addMapping(manager.getDirectoryMappings(), newRepositoryPath, vcsName));
}