Merge pull request #294 from DarkflameUniverse/fix-loot-crash

This commit is contained in:
Wincent Holm 2021-12-22 17:55:53 +01:00 committed by GitHub
commit 0afba0d1d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -137,6 +137,10 @@ std::unordered_map<LOT, int32_t> LootGenerator::RollLootMatrix(Entity* player, u
std::unordered_map<LOT, int32_t> drops; std::unordered_map<LOT, int32_t> drops;
if (missionComponent == nullptr) {
return drops;
}
const LootMatrix& matrix = m_LootMatrices[matrixIndex]; const LootMatrix& matrix = m_LootMatrices[matrixIndex];
for (const LootMatrixEntry& entry : matrix) { for (const LootMatrixEntry& entry : matrix) {