From 42bfda2ffe30dff20497b534bc776d6623ce0e9c Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 10 Aug 2021 08:49:06 -0400
Subject: [PATCH] Fix division by zero in LLScrollListCtrl draw

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

diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 1ccca523605..7895c8f489c 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -689,7 +689,7 @@ bool LLScrollListCtrl::updateColumnWidths()
 		{
 			new_width = (S32)ll_round(column->mRelWidth*mItemListRect.getWidth());
 		}
-		else if (column->mDynamicWidth)
+		else if (column->mDynamicWidth && mNumDynamicWidthColumns > 0)
 		{
 			new_width = (mItemListRect.getWidth() - mTotalStaticColumnWidth - mTotalColumnPadding) / mNumDynamicWidthColumns;
 		}
-- 
GitLab