From a2063f4b5a64958af7782d60698119394924ecbc Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 18 Sep 2024 17:23:57 +0200 Subject: [PATCH] Fixed a crash on shutdown when the 'no ROMs' dialog was shown --- es-app/src/views/SystemView.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/es-app/src/views/SystemView.cpp b/es-app/src/views/SystemView.cpp index 03610444e..5836ac7a2 100644 --- a/es-app/src/views/SystemView.cpp +++ b/es-app/src/views/SystemView.cpp @@ -52,6 +52,9 @@ void SystemView::onShow() void SystemView::onHide() { + if (mPrimary == nullptr || mPrimary->getCursor() > static_cast(mSystemElements.size() - 1)) + return; + for (auto& video : mSystemElements[mPrimary->getCursor()].videoComponents) video->stopVideoPlayer(false); }