summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterland.cpp
diff options
context:
space:
mode:
authorgabriel lee <gabriel@lindenlab.com>2010-02-02 14:28:47 +0000
committergabriel lee <gabriel@lindenlab.com>2010-02-02 14:28:47 +0000
commit7c7bea034467987781774fef8c27b54eae434cce (patch)
tree7cd49258f8f80568ca1d9d87de2b9caed43cc1f4 /indra/newview/llfloaterland.cpp
parent95d0df4ab05c4cfcc78f684ab28d36b9cc84410e (diff)
acted on code review advise, check some return pointers for nullness etc
Diffstat (limited to 'indra/newview/llfloaterland.cpp')
-rw-r--r--indra/newview/llfloaterland.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 1b1e4ef612..8cd63deebe 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -427,16 +427,25 @@ BOOL LLPanelLandGeneral::postBuild()
mBtnBuyLand = getChild<LLButton>("Buy Land...");
mBtnBuyLand->setClickedCallback(onClickBuyLand, (void*)&BUY_PERSONAL_LAND);
+ // note: on region change this will not be re checked, should not matter on Agni as
+ // 99% of the time all regions will return the same caps. In case of an erroneous setting
+ // to enabled the floater will just throw an error when trying to get it's cap
std::string url = gAgent.getRegion()->getCapability("LandResources");
if (!url.empty())
{
mBtnScriptLimits = getChild<LLButton>("Scripts...");
- mBtnScriptLimits->setClickedCallback(onClickScriptLimits, this);
+ if(mBtnScriptLimits)
+ {
+ mBtnScriptLimits->setClickedCallback(onClickScriptLimits, this);
+ }
}
else
{
mBtnScriptLimits = getChild<LLButton>("Scripts...");
- mBtnScriptLimits->setVisible(false);
+ if(mBtnScriptLimits)
+ {
+ mBtnScriptLimits->setVisible(false);
+ }
}
mBtnBuyGroupLand = getChild<LLButton>("Buy For Group...");