Fixed an NPE when the glasspane gets keystrokes from esoteric sources