From aab764a6e5657a3b1cf871b6469c8d31629faa5b Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sun, 16 Dec 2012 23:39:58 +0100 Subject: [PATCH] Don't crash when user forgets last name on non-SL grids. --- indra/newview/llstartup.cpp | 9 +++++++++ .../skins/default/xui/en-us/notifications.xml | 16 ++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 168685799..3d7f1869f 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -978,6 +978,15 @@ bool idle_startup() LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << LL_ENDL; gDebugInfo["LoginName"] = firstname + " " + lastname; } + else + { + // User tried to login on a non-SecondLife grid with an empty lastname. + LLSD subs; + subs["GRIDNAME"] = gHippoGridManager->getConnectedGrid()->getGridName(); + LLNotificationsUtil::add(firstname.empty() ? "EmptyFirstNameMessage" : "EmptyLastNameMessage", subs); + LLStartUp::setStartupState(STATE_LOGIN_SHOW); + return FALSE; + } LLScriptEdCore::parseFunctions("lsl_functions_sl.xml"); //Singu Note: This parsing function essentially replaces the entirety of the lscript_library library diff --git a/indra/newview/skins/default/xui/en-us/notifications.xml b/indra/newview/skins/default/xui/en-us/notifications.xml index acb78b1f4..1161aaecc 100644 --- a/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/indra/newview/skins/default/xui/en-us/notifications.xml @@ -264,6 +264,22 @@ An error occurred while updating [APP_NAME]. Please download the latest version yestext="Ok"/> + +[GRIDNAME] requires a non-empty first name to login. +Please try again. + + + +[GRIDNAME] requires a non-empty last name to login. +Please try again. + +