procui: Avoid crash during title shutdown

This commit is contained in:
Exzap 2026-06-04 03:20:30 +02:00
parent 251662aa94
commit c0f02bcbd6

View File

@ -355,6 +355,8 @@ namespace proc_ui
{ {
if (!s_isInitialized.exchange(false)) if (!s_isInitialized.exchange(false))
return; return;
if (!OSIsSchedulerActive())
return; // CafeSystem shutdown in progress, OS functions shouldn't be called anymore. reset() will clean up state on next re-init
if ( !s_isInForeground ) if ( !s_isInForeground )
CancelBackgroundAlarms(); CancelBackgroundAlarms();
for (sint32 i = 0; i < Espresso::CORE_COUNT; i++) for (sint32 i = 0; i < Espresso::CORE_COUNT; i++)