diff --git a/docs/changelog.txt b/docs/changelog.txt index b8db746af..0ef3d5cf5 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -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 diff --git a/plugins/tailor.cpp b/plugins/tailor.cpp index df8781caa..af2a61e4a 100644 --- a/plugins/tailor.cpp +++ b/plugins/tailor.cpp @@ -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;