mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-21 21:17:25 +00:00
Fix loot crash
When applied this commit fixes a crash with the loot system due to a missing nullptr check.
This commit is contained in:
parent
65b7f49c9b
commit
271e14e2f1
@ -137,6 +137,10 @@ std::unordered_map<LOT, int32_t> LootGenerator::RollLootMatrix(Entity* player, u
|
||||
|
||||
std::unordered_map<LOT, int32_t> drops;
|
||||
|
||||
if (missionComponent == nullptr) {
|
||||
return drops;
|
||||
}
|
||||
|
||||
const LootMatrix& matrix = m_LootMatrices[matrixIndex];
|
||||
|
||||
for (const LootMatrixEntry& entry : matrix) {
|
||||
|
Loading…
Reference in New Issue
Block a user