mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Already disposed fixed in HgRepository
This commit is contained in:
@@ -196,9 +196,10 @@ public class HgRepositoryImpl extends RepositoryImpl implements HgRepository {
|
||||
HgRepoInfo currentInfo = readRepoInfo();
|
||||
// update only if something changed!!! if update every time - new log will be refreshed every time, too.
|
||||
// Then blinking and do not work properly;
|
||||
if (!Disposer.isDisposed(getProject()) && !currentInfo.equals(myInfo)) {
|
||||
Project project = getProject();
|
||||
if (!project.isDisposed() && !currentInfo.equals(myInfo)) {
|
||||
myInfo = currentInfo;
|
||||
HgCommandResult branchCommandResult = new HgBranchesCommand(getProject(), getRoot()).collectBranches();
|
||||
HgCommandResult branchCommandResult = new HgBranchesCommand(project, getRoot()).collectBranches();
|
||||
if (branchCommandResult == null || branchCommandResult.getExitValue() != 0) {
|
||||
LOG.warn("Could not collect hg opened branches."); // hg executable is not valid
|
||||
myOpenedBranches = myInfo.getBranches().keySet();
|
||||
@@ -206,7 +207,9 @@ public class HgRepositoryImpl extends RepositoryImpl implements HgRepository {
|
||||
else {
|
||||
myOpenedBranches = HgBranchesCommand.collectNames(branchCommandResult);
|
||||
}
|
||||
getProject().getMessageBus().syncPublisher(HgVcs.STATUS_TOPIC).update(getProject(), getRoot());
|
||||
if (!project.isDisposed()) {
|
||||
project.getMessageBus().syncPublisher(HgVcs.STATUS_TOPIC).update(project, getRoot());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user