diff --git a/src/solaris/classes/sun/awt/X11/XToolkit.java b/src/solaris/classes/sun/awt/X11/XToolkit.java index 03b852cf5b026a2bcd31156145849c7272db37ad..0c99c9fa313ea85fca9be1d60277d9cb3be6f994 100644 --- a/src/solaris/classes/sun/awt/X11/XToolkit.java +++ b/src/solaris/classes/sun/awt/X11/XToolkit.java @@ -2415,14 +2415,16 @@ public final class XToolkit extends UNIXToolkit implements Runnable { //System.out.println("XkbNewKeyboard:"+(xke.get_new_kbd())); break; case XConstants.XkbMapNotify : - //TODO: provide a simple unit test. - XlibWrapper.XkbGetUpdatedMap(getDisplay(), - XConstants.XkbKeyTypesMask | - XConstants.XkbKeySymsMask | - XConstants.XkbModifierMapMask | - XConstants.XkbVirtualModsMask, - awt_XKBDescPtr); - //System.out.println("XkbMap:"+(xke.get_map())); + if (awt_XKBDescPtr != 0) { + //TODO: provide a simple unit test. + XlibWrapper.XkbGetUpdatedMap(getDisplay(), + XConstants.XkbKeyTypesMask | + XConstants.XkbKeySymsMask | + XConstants.XkbModifierMapMask | + XConstants.XkbVirtualModsMask, + awt_XKBDescPtr); + } + //System.out.println("XkbMap:"+(xke.get_map())); break; case XConstants.XkbStateNotify : // May use it later e.g. to obtain an effective group etc.