Skip to content

Commit 657cba0

Browse files
author
Vasilii Burlacu
committed
Fixed issue with null pointer for the disabled XML attribute
1 parent 0f178c7 commit 657cba0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/com/magento/idea/magento2plugin/inspections/xml/PluginDeclarationInspection.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,13 @@ public void visitFile(PsiFile file) {
7575
XmlAttribute pluginTypeNameAttribute = pluginTypeXmlTag.getAttribute(ModuleDiXml.PLUGIN_TYPE_ATTR_NAME);
7676
XmlAttribute pluginTypeDisabledAttribute = pluginTypeXmlTag.getAttribute(ModuleDiXml.DISABLED_ATTR_NAME);
7777

78-
if (pluginTypeNameAttribute == null || (pluginTypeDisabledAttribute != null && pluginTypeDisabledAttribute.getValue().equals("true"))) {
78+
if (pluginTypeNameAttribute == null ||
79+
(
80+
pluginTypeDisabledAttribute != null &&
81+
pluginTypeDisabledAttribute.getValue() != null &&
82+
pluginTypeDisabledAttribute.getValue().equals("true")
83+
)
84+
) {
7985
continue;
8086
}
8187

0 commit comments

Comments
 (0)