Skip to content

Commit

Permalink
add checks for 'disposed' projects in async blocks
Browse files Browse the repository at this point in the history
fixes issue #291
  • Loading branch information
uwolfer committed Sep 10, 2017
1 parent 7f63b9f commit 2debb37
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -684,8 +684,14 @@ private <T> void accessGerrit(final Supplier<T> supplier,
ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
public void run() {
if (project.isDisposed()) {
return;
}
Task.Backgroundable backgroundTask = new Task.Backgroundable(project, "Accessing Gerrit", true) {
public void run(@NotNull ProgressIndicator indicator) {
if (project.isDisposed()) {
return;
}
try {
final T result = supplier.get();
ApplicationManager.getApplication().invokeLater(new Runnable() {
Expand Down

0 comments on commit 2debb37

Please sign in to comment.