diff options
author | Merov Linden <merov@lindenlab.com> | 2013-10-28 17:15:57 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-10-28 17:15:57 -0700 |
commit | 3a57a67c5d386cfa6df004915ecb0104b3207e72 (patch) | |
tree | fb315ef3dae556c3a4e7e1879a420421dd0c2486 /indra/newview/llfacebookconnect.cpp | |
parent | 1e32b9dd33fb9e2f0d9a7935a3696b423a191354 (diff) |
ACME-1099 : Fix crash when getting the Facebook cap from a (potentially null) region
Diffstat (limited to 'indra/newview/llfacebookconnect.cpp')
-rw-r--r-- | indra/newview/llfacebookconnect.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index 611d18d6d6..9a20ce8f1b 100644 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -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; } |