提交 631b6ff3 编写于 作者: P pchelko

8023148: [macosx] java.util.NoSuchElementException at java.util.LinkedList.getFirst

Reviewed-by: ant, serb
上级 88bd89b6
...@@ -287,7 +287,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -287,7 +287,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
synchronized (this) { synchronized (this) {
KeyEvent ke = enqueuedKeyEvents.isEmpty() ? null : enqueuedKeyEvents.getFirst(); KeyEvent ke = enqueuedKeyEvents.isEmpty() ? null : enqueuedKeyEvents.getFirst();
if (ke != null && time >= ke.getWhen()) { if (ke != null && time >= ke.getWhen()) {
TypeAheadMarker marker = typeAheadMarkers.getFirst(); TypeAheadMarker marker = typeAheadMarkers.isEmpty() ? null : typeAheadMarkers.getFirst();
if (marker != null) { if (marker != null) {
Window toplevel = marker.untilFocused.getContainingWindow(); Window toplevel = marker.untilFocused.getContainingWindow();
// Check that the component awaiting focus belongs to // Check that the component awaiting focus belongs to
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册