Check whether the uiLanguages list isn't empty
Because Qt can crash or assert on list.first() if the list is empty.
BUG:419947