Permalink
Browse files

Avoid a crash when user name is empty

  • Loading branch information...
deveee committed Jun 12, 2018
1 parent e44266b commit 7d9adf5b935feee810cd9474fe4e72b4796a291f
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/states_screens/register_screen.cpp
@@ -245,6 +245,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);

0 comments on commit 7d9adf5

Please sign in to comment.