mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
diff: do not register annotations on disposed Editor
This is a possible fix for "Memory leak detected: com.intellij.openapi.vcs.actions.AnnotateToggleAction$1"
This commit is contained in:
@@ -120,6 +120,8 @@ public class AnnotateToggleAction extends ToggleAction implements DumbAware {
|
||||
@NotNull final AbstractVcs vcs,
|
||||
@NotNull final UpToDateLineNumberProvider upToDateLineNumbers,
|
||||
final boolean warnAboutSuspiciousAnnotations) {
|
||||
if (project.isDisposed() || editor.isDisposed()) return;
|
||||
|
||||
if (warnAboutSuspiciousAnnotations) {
|
||||
int expectedLines = Math.max(upToDateLineNumbers.getLineCount(), 1);
|
||||
int actualLines = Math.max(fileAnnotation.getLineCount(), 1);
|
||||
|
||||
Reference in New Issue
Block a user