fix multiple crashes

on exit:
- bad timing when the install checks threads run, could crash
- quitting through HOME when a bgm was previewed in the browser
on http get failure:
- the quit flag would be enabled, but the browser wouldn't honour it
This commit is contained in:
LiquidFenrir
2022-06-05 11:49:09 +02:00
parent 4c053bb447
commit 806d0033de
2 changed files with 17 additions and 8 deletions

View File

@@ -483,7 +483,7 @@ bool themeplaza_browser(EntryMode mode)
bool extra_mode = false;
while (aptMainLoop())
while (aptMainLoop() && !quit)
{
if (current_list->entries == NULL)
break;
@@ -511,12 +511,6 @@ bool themeplaza_browser(EntryMode mode)
exit:
quit = true;
downloaded = false;
if (audio)
{
audio->stop = true;
svcWaitSynchronization(audio->finished, U64_MAX);
audio = NULL;
}
break;
}
@@ -725,6 +719,13 @@ bool themeplaza_browser(EntryMode mode)
}
}
if (audio)
{
audio->stop = true;
svcWaitSynchronization(audio->finished, U64_MAX);
audio = NULL;
}
free_preview(preview);
free_icons(current_list);