From 7502649fc040c1f2e598279a6dfeedd1a781ef3a Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 18 Sep 2024 17:29:54 +0200 Subject: [PATCH] Change to avoid a potential issue for an if statement --- es-app/src/views/SystemView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es-app/src/views/SystemView.cpp b/es-app/src/views/SystemView.cpp index 5836ac7a2..765eb8ed2 100644 --- a/es-app/src/views/SystemView.cpp +++ b/es-app/src/views/SystemView.cpp @@ -52,7 +52,7 @@ void SystemView::onShow() void SystemView::onHide() { - if (mPrimary == nullptr || mPrimary->getCursor() > static_cast(mSystemElements.size() - 1)) + if (mPrimary == nullptr || mPrimary->getCursor() + 1 > static_cast(mSystemElements.size())) return; for (auto& video : mSystemElements[mPrimary->getCursor()].videoComponents)