Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Krasilnikov2008-04-10 14:09:43 +0000
committerOleg Krasilnikov2008-04-10 14:09:43 +0000
commit68059d36750738ede1e3c44c3d146b46764db3db (patch)
tree26a021a39b5bf05de0476324019f71fdef64f28b
parentbac604f82e54690bb0b3aadb0c6ab9185b9f1cf8 (diff)
downloadorg.eclipse.cdt-68059d36750738ede1e3c44c3d146b46764db3db.tar.gz
org.eclipse.cdt-68059d36750738ede1e3c44c3d146b46764db3db.tar.xz
org.eclipse.cdt-68059d36750738ede1e3c44c3d146b46764db3db.zip
NPE elimination
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSettingsPrefStore.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSettingsPrefStore.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSettingsPrefStore.java
index 0fb5fea9531..c5cacfa3f07 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSettingsPrefStore.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolSettingsPrefStore.java
@@ -198,15 +198,20 @@ public class ToolSettingsPrefStore implements IPreferenceStore {
}
public Object[] getOption(String id){
- if (selectedElement == null) return null;
+ if (selectedElement == null)
+ return null;
IHoldsOptions selectedHolder = selectedElement.getHoldOptions();
- if (selectedHolder == null) selectedHolder = selectedElement.getTool();
+ if (selectedHolder == null)
+ selectedHolder = selectedElement.getTool();
Object options[][] = optCategory.getOptions(rcInfo, selectedHolder);
-
+ if (options == null)
+ return null;
+
for(int i = 0; i < options.length; i++){
IHoldsOptions ho = (IHoldsOptions)options[i][0];
- if(ho == null) break;
+ if(ho == null)
+ break;
IOption option = (IOption)options[i][1];

Back to the top