Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Andre Laperle2011-10-11 23:38:04 +0000
committerMarc-Andre Laperle2011-10-11 23:38:04 +0000
commit235d88f017dc567c5a9eb9d1c872826c56d6662a (patch)
treed9f21acc7cb68e397629182d022ebab06cc04624
parent5adc3b396082be675fe34579ca30f029f223d9d1 (diff)
downloadorg.eclipse.cdt-235d88f017dc567c5a9eb9d1c872826c56d6662a.tar.gz
org.eclipse.cdt-235d88f017dc567c5a9eb9d1c872826c56d6662a.tar.xz
org.eclipse.cdt-235d88f017dc567c5a9eb9d1c872826c56d6662a.zip
Bug 352256 - NPE when resetting Name Style to defaults
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/NameStyleBlock.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/NameStyleBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/NameStyleBlock.java
index f0f168ea7ec..f31d47696dc 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/NameStyleBlock.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/NameStyleBlock.java
@@ -405,7 +405,7 @@ public class NameStyleBlock extends OptionsConfigurationBlock {
@Override
protected void validateSettings(Key changedKey, String oldValue, String newValue) {
StatusInfo status = new StatusInfo();
- if (selectedCategory != null) {
+ if (selectedCategory != null && changedKey != null) {
NameValidator validator = selectedCategory.getNameValidator();
if (changedKey.equals(selectedCategory.getPrefixKey()) ||
changedKey.equals(selectedCategory.getAlternativePrefixKey())) {

Back to the top