summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-10-30 16:12:02 -0700
committerMerov Linden <merov@lindenlab.com>2013-10-30 16:12:02 -0700
commita52fba0e48d28c3a3d40302192cd1eaef393e96f (patch)
treeaf3a575638f1bd2f7acd2d2c93dcb411ea2937d6
parent85b6aeb4046c08986310eeb74d3cc1806dd07719 (diff)
ACME-1104 : Crash when getting a cap from an unset region. Extended ACME-1099 fix.
-rw-r--r--indra/newview/llfacebookconnect.cpp34
1 files changed, 22 insertions, 12 deletions
diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp
index 67a1792aa5..18a817f371 100644
--- a/indra/newview/llfacebookconnect.cpp
+++ b/indra/newview/llfacebookconnect.cpp
@@ -373,25 +373,35 @@ std::string LLFacebookConnect::getFacebookConnectURL(const std::string& route, b
std::string LLFacebookConnect::getFlickrConnectURL(const std::string& route, bool include_read_from_master)
{
- std::string url = gAgent.getRegion()->getCapability("FlickrConnect");
- url += route;
+ std::string url("");
+ LLViewerRegion *regionp = gAgent.getRegion();
+ if (regionp)
+ {
+ url = regionp->getCapability("FlickrConnect");
+ 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;
}
std::string LLFacebookConnect::getTwitterConnectURL(const std::string& route, bool include_read_from_master)
{
- std::string url = gAgent.getRegion()->getCapability("TwitterConnect");
- url += route;
+ std::string url("");
+ LLViewerRegion *regionp = gAgent.getRegion();
+ if (regionp)
+ {
+ url = regionp->getCapability("TwitterConnect");
+ 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;
}