From 32e04cd264c087d7d24e67dc8cbe89a57bced55a Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 2 Jun 2019 00:46:11 -0700 Subject: [PATCH] Fix for crash in world from shared tasks --- world/cliententry.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/world/cliententry.cpp b/world/cliententry.cpp index 9b7c124fc..c081a8541 100644 --- a/world/cliententry.cpp +++ b/world/cliententry.cpp @@ -260,8 +260,6 @@ void ClientListEntry::ClearVars(bool iAll) { gm = 0; pClientVersion = 0; shared_task_id = 0; - if (m_shared_task != nullptr) - m_shared_task->MemberLeftGame(this); m_shared_task = nullptr; for (auto &elem : tell_queue) safe_delete_array(elem); @@ -276,6 +274,9 @@ void ClientListEntry::Camp(ZoneServer* iZS) { LSUpdate(pzoneserver); } + if (m_shared_task != nullptr) + m_shared_task->MemberLeftGame(this); + ClearVars(); stale = 0;