Avoid a crash when user name is empty
This commit is contained in:
parent
e44266b526
commit
7d9adf5b93
@ -246,6 +246,13 @@ void RegisterScreen::doRegister()
|
||||
stringw local_name = getWidget<TextBoxWidget>("local_username")
|
||||
->getText().trim();
|
||||
|
||||
if (local_name.empty())
|
||||
{
|
||||
m_info_widget->setErrorColor();
|
||||
m_info_widget->setText(_("User name cannot be empty."), false);
|
||||
return;
|
||||
}
|
||||
|
||||
handleLocalName(local_name);
|
||||
|
||||
// If no online account is requested, don't register
|
||||
|
Loading…
Reference in New Issue
Block a user