From 9ccee2a037c24bc88927a006a52160e94b374f3c Mon Sep 17 00:00:00 2001 From: jlin16 Date: Tue, 26 Dec 2006 06:46:27 +0000 Subject: [PATCH] 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 --- .../tianocore/frameworkwizard/platform/ui/FpdModuleSA.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java index 380a702eb4..1fd0210613 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java @@ -499,7 +499,7 @@ public class FpdModuleSA extends JDialog implements ActionListener { Iterator lcdi = this.classConsumed.keySet().iterator(); while (lcdi.hasNext()) { LibraryClassDescriptor lcd = lcdi.next(); - if (lcd.className.equals(className)) { + if ((lcd.className != null) && lcd.className.equals(className)) { return this.classConsumed.get(lcd); } } @@ -748,7 +748,7 @@ public class FpdModuleSA extends JDialog implements ActionListener { jTextFieldMaxDatumSize.setText(model.getValueAt(selectedRow, 4)+""); jTextFieldPcdDefault.setEnabled(true); 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")) { jTextFieldMaxDatumSize.setVisible(false); } @@ -1703,7 +1703,7 @@ private JComboBox getJComboBoxItemType() { return; } - if (jComboBoxItemType.getSelectedItem().equals("FIXED_AT_BUILD")) { + if (jComboBoxItemType.getSelectedItem() != null && jComboBoxItemType.getSelectedItem().equals("FIXED_AT_BUILD")) { jTextFieldPcdDefault.setEnabled(true); } else {