diff options
author | Merov Linden <merov@lindenlab.com> | 2013-12-03 14:22:27 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-12-03 14:22:27 -0800 |
commit | ffff7ef59f43c66f966f259cb30e069a2445aa66 (patch) | |
tree | b236b5a45ded0a01250fa4a7fe8cc2922c903174 | |
parent | 6496e5877b0996353496101433bb9154926fef8b (diff) |
ACME-1117 : Fixed crash in Facebook checkin in logged out situation, check presence of region before accessing it
-rw-r--r-- | indra/newview/llfloatersocial.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp index 31404da7d3..e7be8cc8cc 100644 --- a/indra/newview/llfloatersocial.cpp +++ b/indra/newview/llfloatersocial.cpp @@ -62,9 +62,10 @@ const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_ std::string get_map_url() { LLVector3d center_agent; - if (gAgent.getRegion()) + LLViewerRegion *regionp = gAgent.getRegion(); + if (regionp) { - center_agent = gAgent.getRegion()->getCenterGlobal(); + center_agent = regionp->getCenterGlobal(); } int x_pos = center_agent[0] / 256.0; int y_pos = center_agent[1] / 256.0; @@ -607,7 +608,12 @@ void LLSocialCheckinPanel::sendCheckin() slurl_string += DEFAULT_CHECKIN_QUERY_PARAMETERS; // Get the region name - std::string region_name = gAgent.getRegion()->getName(); + std::string region_name(""); + LLViewerRegion *regionp = gAgent.getRegion(); + if (regionp) + { + region_name = regionp->getName(); + } // Get the region description std::string description; |