8185890: Intermittent NPE in JLightweightFrame when updating cursor aceoss multiple graphics devices
Reviewed-by: azvegint
This commit is contained in:
parent
53de58f50d
commit
3357f6846c
@ -509,7 +509,16 @@ public final class JLightweightFrame extends LightweightFrame implements RootPan
|
||||
* and could not be overridden.
|
||||
*/
|
||||
private void updateClientCursor() {
|
||||
Point p = MouseInfo.getPointerInfo().getLocation();
|
||||
PointerInfo pointerInfo = MouseInfo.getPointerInfo();
|
||||
if (pointerInfo == null) {
|
||||
/*
|
||||
* This can happen when multiple graphics device cannot decide
|
||||
* which graphics device contains the current mouse position
|
||||
* or on systems without a mouse
|
||||
*/
|
||||
return;
|
||||
}
|
||||
Point p = pointerInfo.getLocation();
|
||||
SwingUtilities.convertPointFromScreen(p, this);
|
||||
Component target = SwingUtilities.getDeepestComponentAt(this, p.x, p.y);
|
||||
if (target != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user