This commit is contained in:
SecretsOTheP authored and Derision committed 2013-03-17 13:01:53 +00:00
1 parent d76a8bd34a
commit 0bc942f4d5
3 files changed
+113 -81

No files matched your search

+10 -1
View File
@@ -5627,7 +5627,7 @@ bool Merc::Unsuspend(bool setMaxStats) {
if(!mercOwner->IsGrouped())
{
Group *g = new Group(mercOwner);
if(AddMercToGroup(this, g))
if(g && AddMercToGroup(this, g))
{
entity_list.AddGroup(g);
database.SetGroupLeaderName(g->GetID(), mercOwner->GetName());
@@ -5638,6 +5638,15 @@ bool Merc::Unsuspend(bool setMaxStats) {
loaded = true;
}
else
{
if(MERC_DEBUG > 0)
mercOwner->Message(7, "Mercenary failed to join the group - Suspending");
Suspend();
safe_delete(g);
return false;
}
}
else if (AddMercToGroup(this, mercOwner->GetGroup()))
{