From 687da1144c95c67d1d2f32b7895ffc8319d7acdf Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 23 Feb 2017 11:15:33 +0100 Subject: [PATCH] Just in case gAgentUsername is empty... --- indra/newview/daeexport.cpp | 4 +++- indra/newview/fsfloaterexport.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/indra/newview/daeexport.cpp b/indra/newview/daeexport.cpp index cdcd04b137..9c061107f9 100644 --- a/indra/newview/daeexport.cpp +++ b/indra/newview/daeexport.cpp @@ -743,7 +743,9 @@ bool DAESaver::saveDAE(std::string filename) up_axis->setCharData("Z_UP"); // File creator - std::string author = gAgentUsername; + std::string author = "Unknown"; + if (!gAgentUsername.empty()) + author = gAgentUsername; daeElement* contributor = asset->add("contributor"); contributor->add("author")->setCharData(author); diff --git a/indra/newview/fsfloaterexport.cpp b/indra/newview/fsfloaterexport.cpp index d5bca1e9a5..40baea6dd9 100644 --- a/indra/newview/fsfloaterexport.cpp +++ b/indra/newview/fsfloaterexport.cpp @@ -299,7 +299,9 @@ bool FSFloaterObjectExport::exportSelection() mAssetRequests.clear(); mTextureChecked.clear(); - std::string author = gAgentUsername; + std::string author = "Unknown"; + if (!gAgentUsername.empty()) + author = gAgentUsername; time_t rawtime; time(&rawtime);