summaryrefslogtreecommitdiff
path: root/indra/llui/llfolderviewitem.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-04-16 15:25:25 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-04-16 15:25:25 -0400
commit78d985c154b0d71064b89891f5b2005e48c300ce (patch)
treec43bc6be58ec9b30f0f4dfaa6c027736fb331582 /indra/llui/llfolderviewitem.cpp
parent6c2a278c3dbd9d0660be5e9f6ec1c756af7cb992 (diff)
parenta3cbd41543258818589dd0e368c68d2dc62b3398 (diff)
Merge branch 'main' into release/luau-scripting
Diffstat (limited to 'indra/llui/llfolderviewitem.cpp')
-rw-r--r--indra/llui/llfolderviewitem.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index bc9469cfad..2bd14f6f6a 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -187,14 +187,18 @@ LLFolderViewItem::~LLFolderViewItem()
BOOL LLFolderViewItem::postBuild()
{
- LLFolderViewModelItem& vmi = *getViewModelItem();
- // getDisplayName() is expensive (due to internal getLabelSuffix() and name building)
- // it also sets search strings so it requires a filter reset
- mLabel = vmi.getDisplayName();
- setToolTip(vmi.getName());
+ LLFolderViewModelItem* vmi = getViewModelItem();
+ llassert(vmi); // not supposed to happen, if happens, find out why and fix
+ if (vmi)
+ {
+ // getDisplayName() is expensive (due to internal getLabelSuffix() and name building)
+ // it also sets search strings so it requires a filter reset
+ mLabel = vmi->getDisplayName();
+ setToolTip(vmi->getName());
- // Dirty the filter flag of the model from the view (CHUI-849)
- vmi.dirtyFilter();
+ // Dirty the filter flag of the model from the view (CHUI-849)
+ vmi->dirtyFilter();
+ }
// Don't do full refresh on constructor if it is possible to avoid
// it significantly slows down bulk view creation.