key accelerators: fix a few potential NULL pointer references. fixes #9632