SL-11866 [D493] Some startup elements can be executed twice, added protections

meow-7.2.2
andreykproductengine 2019-09-04 17:30:50 +03:00
parent 05dee4c10b
commit a8bc48b334
1 changed files with 12 additions and 3 deletions

View File

@ -806,7 +806,11 @@ bool idle_startup()
gLoginMenuBarView->setEnabled( TRUE );
show_debug_menus();
LLConversationLog::initParamSingleton();
if (!LLConversationLog::instanceExists())
{
// Check existance since this part can be reached twice if login fails
LLConversationLog::initParamSingleton();
}
// Hide the splash screen
LLSplashScreen::hide();
@ -895,8 +899,13 @@ bool idle_startup()
LLFile::mkdir(gDirUtilp->getLindenUserDir());
// As soon as directories are ready initialize notification storages
LLPersistentNotificationStorage::initParamSingleton();
LLDoNotDisturbNotificationStorage::initParamSingleton();
if (!LLPersistentNotificationStorage::instanceExists())
{
// check existance since this part of code can be reached
// twice due to login failures
LLPersistentNotificationStorage::initParamSingleton();
LLDoNotDisturbNotificationStorage::initParamSingleton();
}
// Set PerAccountSettingsFile to the default value.
gSavedSettings.setString("PerAccountSettingsFile",