From eacd2c2cdeb1cc85d1e44cf5240e636697810a98 Mon Sep 17 00:00:00 2001 From: E Spause Date: Sun, 19 Jul 2020 02:30:50 -0400 Subject: [PATCH] Fix null pointers in group/raid pointer removal --- zone/entity.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zone/entity.cpp b/zone/entity.cpp index b00735e4a..4cccd8a52 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -2476,7 +2476,7 @@ void EntityList::RemoveAllGroups() while (group_list.size()) { auto group = group_list.front(); group_list.pop_front(); - delete group; + safe_delete(group); } #if EQDEBUG >= 5 CheckGroupList (__FILE__, __LINE__); @@ -2488,7 +2488,7 @@ void EntityList::RemoveAllRaids() while (raid_list.size()) { auto raid = raid_list.front(); raid_list.pop_front(); - delete raid; + safe_delete(raid); } } @@ -2838,7 +2838,7 @@ bool EntityList::RemoveGroup(uint32 delete_id) } auto group = *it; group_list.erase(it); - delete group; + safe_delete(group); return true; } @@ -2850,7 +2850,7 @@ bool EntityList::RemoveRaid(uint32 delete_id) return false; auto raid = *it; raid_list.erase(it); - delete raid; + safe_delete(raid); return true; }