v2.9.4: Absturz beim Beenden behoben (Hintergrund-Threads, die noch auf den Server warten)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Nico Meister
2026-10-18 22:47:36 +02:00
co-authored by Claude Opus 5.5
parent 52e0270c80
commit 9ffe07ff48
5 changed files with 29 additions and 12 deletions
+7 -4
View File
@@ -268,10 +268,13 @@ bool update_pending(void)
return state == UPD_AVAILABLE || state == UPD_DOWNLOADING || state == UPD_INSTALLED;
}
void update_finish(void)
bool update_finish(void)
{
if (!thread) return;
// Läuft der Download noch, nicht freigeben: Die App beendet sich ohnehin.
if (R_SUCCEEDED(threadJoin(thread, 3ULL * 1000 * 1000 * 1000))) threadFree(thread);
if (!thread) return true;
// Läuft die Abfrage noch, nicht freigeben (sonst schreibt der Thread in freigegebenen Speicher).
// false = läuft noch, die App muss sich hart beenden (main.c).
if (R_FAILED(threadJoin(thread, 15ULL * 1000 * 1000 * 1000))) return false;
threadFree(thread);
thread = NULL;
return true;
}