RPL: Fix race condition when closing Cemu while game is booting

This commit is contained in:
Exzap committed 2026-09-10 13:27:22 +02:00
1 parent 8cf39971a7
commit fb3d265d70
1 file changed
+2 -2
+2 -2
View File
@@ -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();