Fixed crash when local user name is empty.
This commit is contained in:
parent
71d4e380b3
commit
4f14ddb944
@ -139,7 +139,8 @@ void RegisterScreen::doRegister()
|
|||||||
// If no online account is requested, don't register
|
// If no online account is requested, don't register
|
||||||
if(!getWidget<CheckBoxWidget>("online")->getState())
|
if(!getWidget<CheckBoxWidget>("online")->getState())
|
||||||
{
|
{
|
||||||
UserScreen::getInstance()->newUserAdded(local_name, L"");
|
if(local_name.size()>0)
|
||||||
|
UserScreen::getInstance()->newUserAdded(local_name, L"");
|
||||||
StateManager::get()->popMenu();
|
StateManager::get()->popMenu();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -183,7 +184,8 @@ void RegisterScreen::doRegister()
|
|||||||
}
|
}
|
||||||
|
|
||||||
sfx_manager->quickSound( "anvil" );
|
sfx_manager->quickSound( "anvil" );
|
||||||
UserScreen::getInstance()->newUserAdded(local_name, username);
|
if(local_name.size()>0)
|
||||||
|
UserScreen::getInstance()->newUserAdded(local_name, username);
|
||||||
} // doRegister
|
} // doRegister
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user