From fed3cc7844d8b550f94983d0d6a2cd765994a8c7 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 5 Aug 2021 16:05:49 -0400
Subject: [PATCH] Fix a crash

---
 indra/llui/llscrolllistctrl.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index f1226202426..4884a0068c6 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -2068,9 +2068,10 @@ BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask)
 			for (item_list::iterator iter = mItemList.begin(); iter != mItemList.end(); iter++)
 			{
 				LLScrollListItem* item = *iter;
-				if (item->getSelected())
+				if (item && item->getSelected())
 				{
 					LLScrollListCell* cellp = item->getColumn(column_index);
+					if (!cellp) continue;
 					cellp->setValue(item_value);
 					cellp->onCommit();
 					if (mLastSelected == NULL)
-- 
GitLab