From b3bb13b00647a2bb06b2657bd1f6110de3f5f039 Mon Sep 17 00:00:00 2001
From: Ansariel <ansariel.hiller@phoenixviewer.com>
Date: Tue, 9 Jan 2024 09:42:42 +0100
Subject: Simplify expression

---
 indra/llui/lllayoutstack.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'indra/llui')

diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 9ccf3b1627..2769a96875 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -408,9 +408,9 @@ void LLLayoutStack::updateLayout()
 	llassert(total_visible_fraction < 1.05f);
 
 	// don't need spacing after last panel
+	if (!mPanels.empty())
 	{
-		LLLayoutPanel* panelp = mPanels.empty() ? nullptr : mPanels.back();
-		space_to_distribute += panelp ? ll_round((F32)mPanelSpacing * panelp->getVisibleAmount()) : 0;
+		space_to_distribute += ll_round(F32(mPanelSpacing) * mPanels.back()->getVisibleAmount());
 	}
 
 	S32 remaining_space = space_to_distribute;
-- 
cgit v1.2.3