From becb10a630056084da1804b68650c6930d6a25e6 Mon Sep 17 00:00:00 2001 From: Konstantin Kolosovsky Date: Wed, 30 May 2018 00:29:00 +0300 Subject: [PATCH] vcs: Fix ISE on calling "Group By" changes action with null input event For instance, by mnemonic from quick actions popup IDEA-192793 EA-121361 --- .../vcs/changes/actions/SelectChangesGroupingActionGroup.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/actions/SelectChangesGroupingActionGroup.kt b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/actions/SelectChangesGroupingActionGroup.kt index 3e97ac584aa7..29c92310ec53 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/actions/SelectChangesGroupingActionGroup.kt +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/actions/SelectChangesGroupingActionGroup.kt @@ -24,10 +24,10 @@ class SelectChangesGroupingActionGroup : DefaultActionGroup(), DumbAware { } val popup = SelectChangesGroupingActionPopup(group, e.dataContext) - val component = e.inputEvent.component + val component = e.inputEvent?.component when (component) { is ActionButtonComponent -> popup.showUnderneathOf(component) - else -> popup.showInCenterOf(component) + else -> popup.showInBestPositionFor(e.dataContext) } } }