Change to avoid a potential issue for an if statement

This commit is contained in:
Leon Styhre 2024-09-18 17:29:54 +02:00
parent a2063f4b5a
commit 7502649fc0

View file

@ -52,7 +52,7 @@ void SystemView::onShow()
void SystemView::onHide()
{
if (mPrimary == nullptr || mPrimary->getCursor() > static_cast<int>(mSystemElements.size() - 1))
if (mPrimary == nullptr || mPrimary->getCursor() + 1 > static_cast<int>(mSystemElements.size()))
return;
for (auto& video : mSystemElements[mPrimary->getCursor()].videoComponents)