[Crash] Pointer validation in mob iteration loops (#2490)

This commit is contained in:
Chris Miles authored and GitHub committed 2022-10-15 15:10:11 -05:00
1 parent 05723ad1e8
commit bbbebdd346
7 files changed
+62 -4

No files matched your search

+3
View File
@@ -3866,6 +3866,9 @@ void Mob::Say(const char *format, ...)
if (RuleB(Chat, QuestDialogueUsesDialogueWindow)) {
for (auto &e : entity_list.GetCloseMobList(talker, (distance * distance))) {
Mob *mob = e.second;
if (!mob) {
continue;
}
if (!mob->IsClient()) {
continue;