Don't instantiate LLTextParser::getInstance before user logged in.

This commit is contained in:
Aleric Inglewood
2011-08-02 23:26:02 +02:00
committed by Siana Gearz
parent 2ceebebb49
commit f297068ec0
3 changed files with 18 additions and 7 deletions

View File

@@ -233,15 +233,14 @@ void LLTextParser::loadKeywords()
bool LLTextParser::saveToDisk(LLSD highlights)
{
mHighlights=highlights;
std::string filename=getFileName();
if (filename.empty())
if (gDirUtilp->getLindenUserDir(true).empty())
{
llwarns << "LLTextParser::saveToDisk() no valid user directory." << llendl;
return FALSE;
// User didn't login, so nothing to save.
return false;
}
llofstream file;
file.open(filename.c_str());
file.open(getFileName().c_str());
LLSDSerialize::toPrettyXML(mHighlights, file);
file.close();
return TRUE;
return true;
}