馃崚 appmenu: fix crash when there is no matched menu item
QList::first() will crash when QList is empty. We should use QList::empty() instead to guard against empty menu.
BUG: 467979 FIXED-IN: 5.27.5
(cherry picked from commit 9d8d1de2)