From 0427ad2914d093a6e3c41937ecb1b647ba60f8f3 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 4 Feb 2021 19:30:44 +0200 Subject: [PATCH] Fix #13992: Do not show empty groups in guest list --- src/openrct2-ui/windows/GuestList.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/openrct2-ui/windows/GuestList.cpp b/src/openrct2-ui/windows/GuestList.cpp index 348193a362..1436ce958f 100644 --- a/src/openrct2-ui/windows/GuestList.cpp +++ b/src/openrct2-ui/windows/GuestList.cpp @@ -855,7 +855,10 @@ private: _groups.begin(), _groups.end(), [](const GuestGroup& a, const GuestGroup& b) { return a.NumGuests > b.NumGuests; }); // Remove up to MaxGroups - _groups.resize(MaxGroups); + if (_groups.size() > MaxGroups) + { + _groups.resize(MaxGroups); + } } /**