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
master
Andrey Kleshchev 2021-10-21 23:58:18 +03:00
parent 8d64a0da52
commit b41f6cd2b5
2 changed files with 6 additions and 2 deletions

View File

@ -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)

View File

@ -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");