ACME-1099 : Fix crash when getting the Facebook cap from a (potentially null) region

master
Merov Linden 2013-10-28 17:15:57 -07:00
parent 1e32b9dd33
commit 3a57a67c5d
1 changed files with 11 additions and 6 deletions

View File

@ -356,13 +356,18 @@ void LLFacebookConnect::openFacebookWeb(std::string url)
std::string LLFacebookConnect::getFacebookConnectURL(const std::string& route, bool include_read_from_master)
{
std::string url = gAgent.getRegion()->getCapability("FacebookConnect");
url += route;
std::string url("");
LLViewerRegion *regionp = gAgent.getRegion();
if (regionp)
{
url = regionp->getCapability("FacebookConnect");
url += route;
if (include_read_from_master && mReadFromMaster)
{
url += "?read_from_master=true";
}
if (include_read_from_master && mReadFromMaster)
{
url += "?read_from_master=true";
}
}
return url;
}