From bfd94306afc9e8928a33c2f3b4e5d332a9aa546d Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Fri, 6 Oct 2017 22:22:42 +0300 Subject: [PATCH] Fix Already Disposed Exception EA-108721 --- platform/dvcs-impl/src/com/intellij/dvcs/DvcsUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/dvcs-impl/src/com/intellij/dvcs/DvcsUtil.java b/platform/dvcs-impl/src/com/intellij/dvcs/DvcsUtil.java index 9d588000cc92..d4be97c56cbd 100644 --- a/platform/dvcs-impl/src/com/intellij/dvcs/DvcsUtil.java +++ b/platform/dvcs-impl/src/com/intellij/dvcs/DvcsUtil.java @@ -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)); }