diff --git a/src/com/magento/idea/magento2plugin/actions/comparator/CompareTemplateAction.java b/src/com/magento/idea/magento2plugin/actions/comparator/CompareTemplateAction.java index 715cbf101..e61f22631 100644 --- a/src/com/magento/idea/magento2plugin/actions/comparator/CompareTemplateAction.java +++ b/src/com/magento/idea/magento2plugin/actions/comparator/CompareTemplateAction.java @@ -49,8 +49,8 @@ public CompareTemplateAction() { * * @param event AnActionEvent */ - @SuppressWarnings("PMD.NPathComplexity") @Override + @SuppressWarnings({"PMD.CyclomaticComplexity", "PMD.NPathComplexity"}) public void update(final @NotNull AnActionEvent event) { setStatus(event, false); final Project project = event.getData(PlatformDataKeys.PROJECT); @@ -83,6 +83,9 @@ public void update(final @NotNull AnActionEvent event) { } final String originalModuleName = getOriginalModuleName(project, psiFile); + if (originalModuleName == null) { + return; + } final PsiDirectory originalModuleDirectory = new ModuleIndex(project).getModuleDirectoryByModuleName(originalModuleName);