fix crash: don't access null action

In particular, don't crash on pressing Enter when lacking qxmpp support
Merge pull request #2647 from AndrewMeadows/fix-crash

fix crash: don't access null action