EA-55097 fix NPE

This commit is contained in:
Konstantin Bulenkov
2015-01-30 20:49:56 +01:00
parent c2e06a68a6
commit c787a5adfb
@@ -103,9 +103,10 @@ public class DarculaTextFieldUI extends BasicTextFieldUI {
protected void showSearchPopup() {
final Object value = myTextField.getClientProperty("JTextField.Search.FindPopup");
if (value instanceof JPopupMenu) {
final JTextComponent editor = getComponent();
if (editor != null && value instanceof JPopupMenu) {
final JPopupMenu popup = (JPopupMenu)value;
popup.show(getComponent(), getSearchIconCoord().x, getComponent().getHeight());
popup.show(editor, getSearchIconCoord().x, editor.getHeight());
}
}