1
0
Fork 0
mirror of https://github.com/HamletDuFromage/aio-switch-updater.git synced 2024-11-09 12:01:44 +00:00

attempt to fix 2345-0008 crashes

This commit is contained in:
flb 2021-08-23 15:07:09 +02:00
parent 8fd21b4a2d
commit e1c2dacc47
4 changed files with 9 additions and 8 deletions

@ -1 +1 @@
Subproject commit 5bbadc951734876bc74490302de561c1bb0231ad
Subproject commit b81a39f73b98aa61919b251521ba1297157a3cf7

@ -1 +1 @@
Subproject commit f80681569d73ffb27e85473e3bccb95b9856f1c1
Subproject commit 29f02751f063c2440d363f2049b0b59f5b330b20

View file

@ -46,9 +46,8 @@ void AppPage::PopulatePage()
listItem = new brls::ListItem(name, "", util::formatApplicationId(tid));
this->DeclareGameListItem(name, tid, &controlData);
free(controlData);
}
free(controlData);
delete[] records;
}
}
@ -105,9 +104,9 @@ void AppPage::CreateDownloadAllButton()
}
u32 AppPage::InitControlData(NsApplicationControlData** controlData) {
free(controlData);
*controlData = (NsApplicationControlData*)malloc(sizeof(NsApplicationControlData));
if(*controlData == NULL) {
free(*controlData);
return 300;
}
else {

View file

@ -114,9 +114,9 @@ std::vector<std::string> getInstalledTitlesNs(){
if (R_SUCCEEDED(nsListApplicationRecord(records, MaxTitleCount, 0, &recordCount))){
for (s32 i = 0; i < recordCount; i++){
controlSize = 0;
free(controlData);
controlData = (NsApplicationControlData*)malloc(sizeof(NsApplicationControlData));
if(controlData == NULL) {
free(controlData);
break;
}
else {
@ -125,11 +125,13 @@ std::vector<std::string> getInstalledTitlesNs(){
if(R_FAILED(nsGetApplicationControlData(NsApplicationControlSource_Storage, records[i].application_id, controlData, sizeof(NsApplicationControlData), &controlSize))) continue;
if(controlSize < sizeof(controlData->nacp)) continue;
if(controlSize < sizeof(controlData->nacp)) {
continue;
}
titles.push_back(util::formatApplicationId(records[i].application_id));
free(controlData);
}
free(controlData);
}
delete[] records;
std::sort(titles.begin(), titles.end());