NPE (16784)

This commit is contained in:
anna
2009-10-29 18:25:43 +03:00
parent 367ba57442
commit a5af7bf985
@@ -230,7 +230,9 @@ public abstract class InspectionToolsConfigurable extends BaseConfigurable imple
});
myShareProfileCheckBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
getSelectedPanel().setProfileShared(myShareProfileCheckBox.isSelected());
final SingleInspectionProfilePanel panel = getSelectedPanel();
LOG.assertTrue(panel != null, "No settings panel for: " + getSelectedObject());
panel.setProfileShared(myShareProfileCheckBox.isSelected());
myProfiles.repaint();
}
});
@@ -315,7 +317,9 @@ public abstract class InspectionToolsConfigurable extends BaseConfigurable imple
}
public void selectInspectionTool(String selectedToolShortName) {
getSelectedPanel().selectInspectionTool(selectedToolShortName);
final SingleInspectionProfilePanel panel = getSelectedPanel();
LOG.assertTrue(panel != null, "No settings panel for: " + getSelectedObject());
panel.selectInspectionTool(selectedToolShortName);
}
protected SingleInspectionProfilePanel getSelectedPanel() {