`tailor`: remove crash

clothing items may have an invalid maker race; this should not happen but it does so we have to deal with it
develop
Kelly Kinkade 2023-08-21 12:46:24 -05:00
parent e8481a4489
commit b76333ae87
2 changed files with 4 additions and 0 deletions

@ -29,6 +29,7 @@ Template for new versions:
## New Features
## Fixes
- `tailor`: remove crash caused by clothing items with an invalid ``maker_race``
## Misc Improvements

@ -186,6 +186,9 @@ public:
}
if (i->getWear() >= 1)
continue;
if (i->getMakerRace() < 0) // sometimes we get borked items with no valid maker race
continue;
df::item_type t = i->getType();
int size = world->raws.creatures.all[i->getMakerRace()]->adultsize;