summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersocial.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-06-24 13:32:13 -0700
committerMerov Linden <merov@lindenlab.com>2013-06-24 13:32:13 -0700
commit37fcb81c4ab8806a52ef747e6a3047fff2d6eccf (patch)
tree7e10b555432382da7ed4a1238aebd9c74d67e561 /indra/newview/llfloatersocial.cpp
parent27bd181a6d07b191d674870039b2801713c554f1 (diff)
ACME-497 : Clean up the xml code for checkin to use a proper icon widget and add a decent default image for it
Diffstat (limited to 'indra/newview/llfloatersocial.cpp')
-rw-r--r--indra/newview/llfloatersocial.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp
index cca966bb9a..361d54f696 100644
--- a/indra/newview/llfloatersocial.cpp
+++ b/indra/newview/llfloatersocial.cpp
@@ -42,7 +42,11 @@ static LLRegisterPanelClassWrapper<LLSocialCheckinPanel> t_panel_checkin("llsoci
std::string get_map_url()
{
- LLVector3d center_agent = gAgent.getRegion()->getCenterGlobal();
+ LLVector3d center_agent;
+ if (gAgent.getRegion())
+ {
+ center_agent = gAgent.getRegion()->getCenterGlobal();
+ }
int x_pos = center_agent[0] / 256.0;
int y_pos = center_agent[1] / 256.0;
std::string map_url = gSavedSettings.getString("CurrentMapServerURL") + llformat("map-1-%d-%d-objects.jpg", x_pos, y_pos);
@@ -104,7 +108,6 @@ void LLSocialCheckinPanel::onSend()
std::string description;
LLAgentUI::buildLocationString(description, LLAgentUI::LOCATION_FORMAT_NORMAL_COORDS, gAgent.getPositionAgent());
-
// Optionally add the region map view
bool add_map_view = getChild<LLUICtrl>("add_place_view_cb")->getValue().asBoolean();
std::string map_url = (add_map_view ? mMapUrl : "");