mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-09-03 22:08:36 +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:
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user