summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-01-04 15:13:02 -0500
committerNat Goodspeed <nat@lindenlab.com>2023-01-04 15:13:02 -0500
commit4093d5b1ebe6b0eb50473d5161042ac3a1b7f6b2 (patch)
tree9ac401a1861bdd5c0a66171643a425d22da05245 /indra/newview
parentaa112ef17f4fdfeecc05e5305af93a6d4b9fce70 (diff)
DRTVWR-575: Use llsdutil.h functions for LLFloaterLandHoldings LLSD
LLFloaterLandHoldings::postBuild() was constructing an LLSD structure by assigning each map entry and array element one at a time. Chorazinallen identified a crash bug possibly caused by destroying that LLSD structure. Diagnostically try building it using nested llsd::map() and llsd::array() calls instead to see if that improves matters.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterlandholdings.cpp32
1 files changed, 17 insertions, 15 deletions
diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp
index 8633fe4e5e..a3222d622f 100644
--- a/indra/newview/llfloaterlandholdings.cpp
+++ b/indra/newview/llfloaterlandholdings.cpp
@@ -39,6 +39,7 @@
#include "llfloaterworldmap.h"
#include "llproductinforequest.h"
#include "llscrolllistctrl.h"
+#include "llsdutil.h"
#include "llstatusbar.h"
#include "lltextbox.h"
#include "llscrolllistctrl.h"
@@ -79,24 +80,25 @@ BOOL LLFloaterLandHoldings::postBuild()
for(S32 i = 0; i < count; ++i)
{
LLUUID id(gAgent.mGroups.at(i).mID);
-
- LLSD element;
- element["id"] = id;
- element["columns"][0]["column"] = "group";
- element["columns"][0]["value"] = gAgent.mGroups.at(i).mName;
- element["columns"][0]["font"] = "SANSSERIF";
-
LLUIString areastr = getString("area_string");
areastr.setArg("[AREA]", llformat("%d", gAgent.mGroups.at(i).mContribution));
- element["columns"][1]["column"] = "area";
- element["columns"][1]["value"] = areastr;
- element["columns"][1]["font"] = "SANSSERIF";
- grant_list->addElement(element);
+ grant_list->addElement(
+ llsd::map(
+ "id", id,
+ "columns", llsd::array(
+ llsd::map(
+ "column", "group",
+ "value", gAgent.mGroups.at(i).mName,
+ "font", "SANSSERIF"),
+ llsd::map(
+ "column", "area",
+ "value", areastr,
+ "font", "SANSSERIF"))));
}
-
+
center();
-
+
return TRUE;
}
@@ -108,8 +110,8 @@ LLFloaterLandHoldings::~LLFloaterLandHoldings()
void LLFloaterLandHoldings::onOpen(const LLSD& key)
{
- LLScrollListCtrl *list = getChild<LLScrollListCtrl>("parcel list");
- list->clearRows();
+ LLScrollListCtrl *list = getChild<LLScrollListCtrl>("parcel list");
+ list->clearRows();
// query_id null is known to be us
const LLUUID& query_id = LLUUID::null;