From 4e077ed3d87be35d878b42018cd132942abcfcb7 Mon Sep 17 00:00:00 2001 From: Emagi Date: Sun, 17 Aug 2025 10:44:51 -0400 Subject: [PATCH] make sure the client GetCurrentZone pointer is valid for SendFriendList and SendChatRelationship --- source/WorldServer/client.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/WorldServer/client.cpp b/source/WorldServer/client.cpp index e963e74..4766c66 100644 --- a/source/WorldServer/client.cpp +++ b/source/WorldServer/client.cpp @@ -10736,7 +10736,7 @@ void Client::SendChatRelationship(int8 type, const char* name) { if (type == 0) { Client* client = zone_list.GetClientByCharName(name); if (client) { - packet->setArrayDataByName("location", client->GetCurrentZone()->GetZoneName()); + packet->setArrayDataByName("location", client->GetCurrentZone() ? client->GetCurrentZone()->GetZoneName() : ""); packet->setArrayDataByName("class_name", classes.GetClassName(client->GetPlayer()->GetAdventureClass())); } } @@ -10765,7 +10765,7 @@ void Client::SendFriendList() { client = zone_list.GetClientByCharName(names[i]); packet->setArrayDataByName("name", names[i].c_str(), i); if (client) { - packet->setArrayDataByName("location", client->GetCurrentZone()->GetZoneName(), i); + packet->setArrayDataByName("location", client->GetCurrentZone() ? client->GetCurrentZone()->GetZoneName() : "", i); packet->setArrayDataByName("class_name", classes.GetClassName(client->GetPlayer()->GetAdventureClass()), i); } }