From 5a53947a3e8605768831e90341a1e2f4ad00adbd Mon Sep 17 00:00:00 2001 From: ITotalJustice <47043333+ITotalJustice@users.noreply.github.com> Date: Wed, 14 May 2025 18:00:56 +0100 Subject: [PATCH] fix crash in list layout caused by rendering all previous hidden entries. --- sphaira/source/ui/list.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sphaira/source/ui/list.cpp b/sphaira/source/ui/list.cpp index 151c8e8..3548772 100644 --- a/sphaira/source/ui/list.cpp +++ b/sphaira/source/ui/list.cpp @@ -244,6 +244,11 @@ void List::DrawHome(NVGcontext* vg, Theme* theme, s64 count, Callback callback) nvgIntersectScissor(vg, GetX(), GetY(), GetW(), GetH()); for (s64 i = 0; i < count; i++, v.x += v.w + m_pad.x) { + // skip anything not visible + if (v.x + v.w < GetX()) { + continue; + } + if (v.x > GetX() + GetW()) { break; }