aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/CreatureAI.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2019-06-24 18:47:04 +0200
committerShauren <shauren.trinity@gmail.com>2019-06-24 18:47:04 +0200
commitc0b25c9a83126bfd26da8245a31ea684008d804d (patch)
tree17db5a745b7a859d4bf33929adfce779e957069d /src/server/game/AI/CreatureAI.cpp
parent616c5e8450d9626e7f14599ddda7c82f32b0d972 (diff)
Core/Creatures: Fixed crash in CreatureAI::JustAppeared caused by scripted summons without SummonProperties
Closes #23507
Diffstat (limited to 'src/server/game/AI/CreatureAI.cpp')
-rw-r--r--src/server/game/AI/CreatureAI.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index c8dd13f53b5..b6feeaa51bf 100644
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
@@ -158,8 +158,9 @@ void CreatureAI::JustAppeared()
if (!me->IsSummon())
return;
+ // Summons without SummonProperties are generally scripted summons that don't belong to any owner
TempSummon* summon = me->ToTempSummon();
- if (summon->m_Properties->Category != SUMMON_CATEGORY_UNK && summon->m_Properties->Category != SUMMON_CATEGORY_PET)
+ if (!summon->m_Properties || (summon->m_Properties->Category != SUMMON_CATEGORY_UNK && summon->m_Properties->Category != SUMMON_CATEGORY_PET))
return;
// Not applied to vehicles