summaryrefslogtreecommitdiff
path: root/indra/newview/llurlhistory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llurlhistory.cpp')
-rw-r--r--indra/newview/llurlhistory.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llurlhistory.cpp b/indra/newview/llurlhistory.cpp
index 902ab88688..6c0ef01c81 100644
--- a/indra/newview/llurlhistory.cpp
+++ b/indra/newview/llurlhistory.cpp
@@ -72,9 +72,16 @@ bool LLURLHistory::loadFile(const std::string& filename)
// static
bool LLURLHistory::saveFile(const std::string& filename)
-{
- std::string temp_str = gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter();
- llofstream out((temp_str + filename));
+{
+ std::string temp_str = gDirUtilp->getLindenUserDir();
+ if( temp_str.empty() )
+ {
+ llwarns << "Can't save. No user directory set." << llendl;
+ return false;
+ }
+
+ temp_str += gDirUtilp->getDirDelimiter() + filename;
+ llofstream out(temp_str);
if (!out.good())
{
llwarns << "Unable to open " << filename << " for output." << llendl;