summaryrefslogtreecommitdiff
path: root/indra/newview/llfacebookconnect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfacebookconnect.cpp')
-rw-r--r--indra/newview/llfacebookconnect.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp
index ac27ade2b4..514aac46fc 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;
}