Do not crash when opening the palette with a keyboard shortcut
When an action is triggered by a keyboard event, the event
passed is 0:
retval = tryRunSingleActionShortcutImpl(key, (QEvent*)0, m_d->keys);
So we need to check whether the event is valid.
BUG:381923