mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix NPE on linux
This commit is contained in:
+3
-2
@@ -96,10 +96,11 @@ public class DarculaTextFieldUI extends BasicTextFieldUI {
|
||||
}
|
||||
|
||||
protected void showSearchPopup() {
|
||||
final Object value = getComponent().getClientProperty("JTextField.Search.FindPopup");
|
||||
final JTextComponent component = getComponent();
|
||||
final Object value = component == null ? null : component.getClientProperty("JTextField.Search.FindPopup");
|
||||
if (value instanceof JPopupMenu) {
|
||||
final JPopupMenu popup = (JPopupMenu)value;
|
||||
popup.show(getComponent(), getSearchIconCoord().x, getComponent().getHeight());
|
||||
popup.show(component, getSearchIconCoord().x, component.getHeight());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user