From 7749f831347f6eef701d67547bd337e6f12ca582 Mon Sep 17 00:00:00 2001 From: Uleat Date: Tue, 27 Aug 2019 01:09:11 -0400 Subject: [PATCH] Temp fix for Bot::Camp() zone crashes (memory leak still needs to be addressed) --- zone/bot.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index ff6ee42d1..971c1d1b6 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -7465,12 +7465,13 @@ void Bot::DoEnduranceUpkeep() { void Bot::Camp(bool databaseSave) { Sit(); - auto group = GetGroup(); - if(group) + //auto group = GetGroup(); + if(GetGroup()) RemoveBotFromGroup(this, GetGroup()); - if (group->GroupCount() < 2) - group->DisbandGroup(); + // RemoveBotFromGroup() code is too complicated for this to work as-is (still needs to be addressed to prevent memory leaks) + //if (group->GroupCount() < 2) + // group->DisbandGroup(); LeaveHealRotationMemberPool();