Changeset 7639 in josm for trunk/src/org


Ignore:
Timestamp:
2014-10-20T19:43:06+02:00 (5 years ago)
Author:
Don-vip
Message:

fix #10651 - NPE in AdvancedKeyPressDetector.isFocusInMainWindow

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/util/AdvancedKeyPressDetector.java

    r7633 r7639  
    195195    private boolean isFocusInMainWindow() {
    196196        Component focused = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
    197         return SwingUtilities.getWindowAncestor(focused) instanceof JFrame;
     197        return focused != null && SwingUtilities.getWindowAncestor(focused) instanceof JFrame;
    198198    }
    199199}
Note: See TracChangeset for help on using the changeset viewer.