fix NumberFormatException

This commit is contained in:
Eugene Kudelevsky
2011-04-08 23:18:04 +04:00
parent ef29b44088
commit de98984fa9
@@ -289,7 +289,12 @@ public class ColorSampleLookupValue implements LookupValueWithUIHint, DeferredUs
public Icon getIcon(int flags) {
if (myColor == null) {
if (myValue.startsWith("#")) {
myColor = Color.decode("0x" + myValue.substring(1));
try {
myColor = Color.decode("0x" + myValue.substring(1));
}
catch (NumberFormatException e) {
return null;
}
}
}