fix plentiful item pool crash

This commit is contained in:
gymnast86
2026-05-28 20:33:20 -07:00
parent e2790d922a
commit 39b079ddb9
@@ -1017,7 +1017,11 @@ namespace randomizer::logic::world
utility::random::ShufflePool(bottleLocations);
for (auto& bottleLocation : bottleLocations)
{
bottleLocation->SetCurrentItem(utility::random::PopRandomElement(bottlePool));
if (!bottlePool.empty()) {
bottleLocation->SetCurrentItem(utility::random::PopRandomElement(bottlePool));
} else {
bottleLocation->SetCurrentItem(this->GetItem("Empty Bottle"));
}
}
}
}