diff --git a/zone/zone.cpp b/zone/zone.cpp index b3139fc0f..23104485b 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -1998,6 +1998,11 @@ void Zone::SetTime(uint8 hour, uint8 minute, bool update_world /*= true*/) ZonePoint* Zone::GetClosestZonePoint(const glm::vec3& location, uint32 to, Client* client, float max_distance) { LinkedListIterator iterator(zone_point_list); ZonePoint* closest_zp = nullptr; + + if (!client) { + return closest_zp; + } + float closest_dist = FLT_MAX; float max_distance2 = max_distance * max_distance; iterator.Reset();