FreeUpBonnetModels effectively matching

This commit is contained in:
Dethrace Labs 2025-11-16 21:55:15 +13:00 committed by Dethrace Engineering Department
parent 4e5110043d
commit c4b620dcf9
1 changed files with 1 additions and 1 deletions

View File

@ -1719,7 +1719,7 @@ void FreeUpBonnetModels(br_model** pModel_array, int pModel_count) {
// TODO: this causes a use-after-free somewhere...
for (i = 0; i < pModel_count; i++) {
if (pModel_array[i]) {
if (strcmp("Ebonnet.DAT", pModel_array[i]->identifier) == 0 || strcmp("FIN.DAT", pModel_array[i]->identifier) == 0) {
if (strcmp(pModel_array[i]->identifier, "Ebonnet.DAT") == 0 || strcmp(pModel_array[i]->identifier, "FIN.DAT") == 0) {
BrModelRemove(pModel_array[i]);
BrModelFree(pModel_array[i]);
pModel_array[i] = NULL;