fix NPE [ann]

This commit is contained in:
Eugene Zhuravlev
2011-12-05 22:17:19 +01:00
parent cb6d299569
commit a83abebb2b

View File

@@ -302,7 +302,8 @@ public class InspectionProfileImpl extends ProfileEx implements ModifiableModel,
}
public InspectionProfileEntry getInspectionTool(@NotNull String shortName) {
return getTools(shortName).getTool();
final ToolsImpl tools = getTools(shortName);
return tools != null? tools.getTool() : null;
}
public InspectionProfileEntry getToolById(String id, @NotNull PsiElement element) {