EA-30897 - NPE: EditorTextField$4.getAttributes

This commit is contained in:
Dmitry Jemerov
2011-10-25 21:25:24 +02:00
parent 510e227ef6
commit b5512f0eac
@@ -408,7 +408,7 @@ public class EditorTextField extends NonOpaquePanel implements DocumentListener,
@Override
public TextAttributes getAttributes(TextAttributesKey key) {
final TextAttributes attributes = super.getAttributes(key);
if (!isEnabled()) {
if (!isEnabled() && attributes != null) {
return new TextAttributes(UIUtil.getInactiveTextColor(), attributes.getBackgroundColor(), attributes.getEffectColor(), attributes.getEffectType(), attributes.getFontType());
}