summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterbuyland.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterbuyland.cpp')
-rw-r--r--indra/newview/llfloaterbuyland.cpp30
1 files changed, 22 insertions, 8 deletions
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index cf73a1104d..52ac981909 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -241,6 +241,17 @@ void LLFloaterBuyLand::updateEstateOwnerName(const std::string& name)
}
// static
+BOOL LLFloaterBuyLand::isOpen()
+{
+ LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::soleInstance(FALSE);
+ if (floater)
+ {
+ return floater->getVisible();
+ }
+ return FALSE;
+}
+
+// static
LLFloaterBuyLandUI* LLFloaterBuyLandUI::sInstance = NULL;
// static
@@ -717,10 +728,11 @@ void LLFloaterBuyLandUI::runWebSitePrep(const std::string& password)
mParcelBuyInfo = gParcelMgr->setupParcelBuy(gAgent.getID(), gAgent.getSessionID(),
gAgent.getGroupID(), mIsForGroup, mIsClaim, remove_contribution);
- if (!mSiteMembershipUpgrade
- && !mSiteLandUseUpgrade
- && mCurrency.getAmount() == 0
- && mSiteConfirm != "password")
+ if (mParcelBuyInfo
+ && !mSiteMembershipUpgrade
+ && !mSiteLandUseUpgrade
+ && mCurrency.getAmount() == 0
+ && mSiteConfirm != "password")
{
sendBuyLand();
return;
@@ -779,10 +791,12 @@ void LLFloaterBuyLandUI::finishWebSitePrep()
void LLFloaterBuyLandUI::sendBuyLand()
{
- gParcelMgr->sendParcelBuy(mParcelBuyInfo);
- gParcelMgr->deleteParcelBuy(mParcelBuyInfo);
-
- mBought = true;
+ if (mParcelBuyInfo)
+ {
+ gParcelMgr->sendParcelBuy(mParcelBuyInfo);
+ gParcelMgr->deleteParcelBuy(mParcelBuyInfo);
+ mBought = true;
+ }
}
void LLFloaterBuyLandUI::updateNames()