Bug 507632 - Exception in ThemeElementHelper prevents Eclipse startup.

Change-Id: I5304fbf3034113b14fd8b8a8263ece3c6eaaf856
Signed-off-by: Stefan Xenos <sxenos@gmail.com>
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ThemeElementHelper.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ThemeElementHelper.java
index 88d7248..9d5dc90 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ThemeElementHelper.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ThemeElementHelper.java
@@ -323,10 +323,12 @@
 				prefColor = definition.getValue();
 			} else if (definition.getDefaultsTo() != null) {
 				prefColor = registry.getRGB(definition.getDefaultsTo());
-			} else {
-				prefColor = defaultColor;
 			}
-        }
+		}
+
+		if (prefColor == null) {
+			prefColor = defaultColor;
+		}
 
         if (setInRegistry) {
         	registry.put(id, prefColor);