summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-10-21 23:58:18 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-10-22 00:01:05 +0300
commitb41f6cd2b522f3ff8effdd17f63c067a468cd4e0 (patch)
treed74389db766347530163cbed195c65c98ea79bfb /indra
parent8d64a0da52ef8636194533f2cff09ecc9649ad45 (diff)
SL-15387 Resolve some columns crashes
Looks like mColumnsIndexed had dead pointers which resulted in a crash and there is some kind of hard to trigger interaction with searchable UI
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llscrolllistctrl.cpp5
-rw-r--r--indra/newview/llfloaterpreference.cpp3
2 files changed, 6 insertions, 2 deletions
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index de644185fd..a63457bdea 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -336,8 +336,7 @@ LLScrollListCtrl::~LLScrollListCtrl()
std::for_each(mItemList.begin(), mItemList.end(), DeletePointer());
mItemList.clear();
- std::for_each(mColumns.begin(), mColumns.end(), DeletePairedPointer());
- mColumns.clear();
+ clearColumns(); //clears columns and deletes headers
delete mIsFriendSignal;
}
@@ -3011,6 +3010,8 @@ void LLScrollListCtrl::clearColumns()
mSortColumns.clear();
mTotalStaticColumnWidth = 0;
mTotalColumnPadding = 0;
+
+ dirtyColumns(); // Clears mColumnsIndexed
}
void LLScrollListCtrl::setColumnLabel(const std::string& column, const std::string& label)
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 1c4fdc433b..0cbd06c38e 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -2958,6 +2958,9 @@ void LLPanelPreferenceControls::populateControlTable()
LL_WARNS() << "Unimplemented mode" << LL_ENDL;
}
+ // explicit update to make sure table is ready for llsearchableui
+ pControlsTable->updateColumns();
+
// Searchable columns were removed and readded, mark searchables for an update
// Note: at the moment tables/lists lack proper llsearchableui support
LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");