Add null pointer check to drop-down list of platform Pcd editor.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2139 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jlin16 2006-12-26 06:46:27 +00:00
parent a477a165ff
commit 9ccee2a037
1 changed files with 3 additions and 3 deletions

View File

@ -499,7 +499,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
Iterator<LibraryClassDescriptor> lcdi = this.classConsumed.keySet().iterator(); Iterator<LibraryClassDescriptor> lcdi = this.classConsumed.keySet().iterator();
while (lcdi.hasNext()) { while (lcdi.hasNext()) {
LibraryClassDescriptor lcd = lcdi.next(); LibraryClassDescriptor lcd = lcdi.next();
if (lcd.className.equals(className)) { if ((lcd.className != null) && lcd.className.equals(className)) {
return this.classConsumed.get(lcd); return this.classConsumed.get(lcd);
} }
} }
@ -748,7 +748,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
jTextFieldMaxDatumSize.setText(model.getValueAt(selectedRow, 4)+""); jTextFieldMaxDatumSize.setText(model.getValueAt(selectedRow, 4)+"");
jTextFieldPcdDefault.setEnabled(true); jTextFieldPcdDefault.setEnabled(true);
jTextFieldPcdDefault.setText(model.getValueAt(selectedRow, 6)+""); jTextFieldPcdDefault.setText(model.getValueAt(selectedRow, 6)+"");
if (model.getValueAt(selectedRow, 5).equals("VOID*")) { if ((model.getValueAt(selectedRow, 5) != null) && model.getValueAt(selectedRow, 5).equals("VOID*")) {
if (pcdInfo[1].equals("FEATURE_FLAG")) { if (pcdInfo[1].equals("FEATURE_FLAG")) {
jTextFieldMaxDatumSize.setVisible(false); jTextFieldMaxDatumSize.setVisible(false);
} }
@ -1703,7 +1703,7 @@ private JComboBox getJComboBoxItemType() {
return; return;
} }
if (jComboBoxItemType.getSelectedItem().equals("FIXED_AT_BUILD")) { if (jComboBoxItemType.getSelectedItem() != null && jComboBoxItemType.getSelectedItem().equals("FIXED_AT_BUILD")) {
jTextFieldPcdDefault.setEnabled(true); jTextFieldPcdDefault.setEnabled(true);
} }
else { else {