[Crash] Add Checks for valid pointers or fix existing. (#3164)

This commit is contained in:
Aeadoin authored and GitHub committed 2023-04-01 12:44:00 -04:00
1 parent 4c2271ff69
commit 0d509a7f3a
19 files changed
+228 -179

No files matched your search

+1 -1
View File
@@ -150,7 +150,7 @@ bool Spawn2::Process() {
//grab our spawn group
SpawnGroup *spawn_group = zone->spawn_group_list.GetSpawnGroup(spawngroup_id_);
if (NPCPointerValid() && (spawn_group->despawn == 0 || condition_id != 0)) {
if (NPCPointerValid() && (spawn_group && spawn_group->despawn == 0 || condition_id != 0)) {
return true;
}