From fb3d265d704cd0a0ee6d8626a5a345e392bb0bf5 Mon Sep 17 00:00:00 2001 From: Exzap <13877693+Exzap@users.noreply.github.com> Date: Tue, 21 Jul 2026 08:43:11 +0200 Subject: [PATCH] RPL: Fix race condition when closing Cemu while game is booting --- src/Cafe/OS/RPL/rpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cafe/OS/RPL/rpl.cpp b/src/Cafe/OS/RPL/rpl.cpp index 384a54a2..c1d7517c 100644 --- a/src/Cafe/OS/RPL/rpl.cpp +++ b/src/Cafe/OS/RPL/rpl.cpp @@ -2512,8 +2512,8 @@ void RPLLoader_UnloadAll() cemu_assert_debug(dependency->referenceCount >= 0); // sanity check for ref count if (!dependency->rplHLEModule) continue; - cemu_assert_debug(dependency->hleEntrypointCalled); // entrypoint should have been called - dependency->rplHLEModule->rpl_entry(dependency->coreinitHandle, coreinit::RplEntryReason::Unloaded); + if (dependency->hleEntrypointCalled) // this can be false if Cemu is exited right after adding dependencies and before they are actually called + dependency->rplHLEModule->rpl_entry(dependency->coreinitHandle, coreinit::RplEntryReason::Unloaded); dependency->rplHLEModule->RPLUnmapped(); } rplDependencyList.clear();