Add null pointer check to drop-down list of platform Pcd editor.
authorjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 26 Dec 2006 06:46:27 +0000 (06:46 +0000)
committerjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 26 Dec 2006 06:46:27 +0000 (06:46 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2139 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java

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