From b94b786013affc9e91d0ddf38d37ffa08ac08baf Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Fri, 18 Mar 2016 13:40:24 +0300 Subject: [PATCH] ui: do not register Disposable without need --- .../intellij/openapi/actionSystem/AnAction.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java b/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java index 4d1a1ca35bcf..da4cb7daee7d 100644 --- a/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java +++ b/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java @@ -164,15 +164,15 @@ public abstract class AnAction implements PossiblyDumbAware { if (!actionList.contains(this)){ actionList.add(this); } - } - if (parentDisposable != null) { - Disposer.register(parentDisposable, new Disposable() { - @Override - public void dispose() { - unregisterCustomShortcutSet(component); - } - }); + if (parentDisposable != null) { + Disposer.register(parentDisposable, new Disposable() { + @Override + public void dispose() { + unregisterCustomShortcutSet(component); + } + }); + } } }