From 8c7aec2edfa3b42750b874c4222cf78078de9613 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 18 Feb 2021 18:02:20 +1000 Subject: [PATCH] CommonHostInterface: Ensure game list is loaded before booting Fixes a possible race/crash when starting with a filename in NoGUI. --- src/frontend-common/common_host_interface.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontend-common/common_host_interface.cpp b/src/frontend-common/common_host_interface.cpp index e10daaacd..fab723463 100644 --- a/src/frontend-common/common_host_interface.cpp +++ b/src/frontend-common/common_host_interface.cpp @@ -139,6 +139,10 @@ void CommonHostInterface::InitializeUserDirectory() bool CommonHostInterface::BootSystem(const SystemBootParameters& parameters) { + // If the fullscreen UI is enabled, make sure it's finished loading the game list so we don't race it. + if (m_fullscreen_ui_enabled) + FullscreenUI::EnsureGameListLoaded(); + if (!HostInterface::BootSystem(parameters)) { // if in batch mode, exit immediately if booting failed