From 46e666410652f4c8978fd9716945f60346cc64a6 Mon Sep 17 00:00:00 2001 From: SilinMykola Date: Thu, 16 Jun 2022 15:56:56 +0300 Subject: [PATCH] 1109 fix bug --- .../actions/generation/OverrideClassByAPreferenceAction.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/magento/idea/magento2plugin/actions/generation/OverrideClassByAPreferenceAction.java b/src/com/magento/idea/magento2plugin/actions/generation/OverrideClassByAPreferenceAction.java index cdf75f51d..1daf41ed0 100644 --- a/src/com/magento/idea/magento2plugin/actions/generation/OverrideClassByAPreferenceAction.java +++ b/src/com/magento/idea/magento2plugin/actions/generation/OverrideClassByAPreferenceAction.java @@ -38,6 +38,10 @@ public OverrideClassByAPreferenceAction() { public void update(final AnActionEvent event) { targetClass = null;// NOPMD final Project project = event.getData(PlatformDataKeys.PROJECT); + + if (project == null) { + return; + } if (Settings.isEnabled(project)) { final Pair pair = this.findPhpClass(event); final PsiFile psiFile = pair.getFirst();