From 24a95507d4507abe343c321d7a77f76add41b433 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Fri, 5 Sep 2008 23:04:20 +0000 Subject: Mantis#2104. Thank you kindly, Godfrey for a patch that: If the parcel pointed to by the landmark has nothing in the Description field (of the General tab in About Land...), a NullReferenceException is thrown and the client is logged out. I added a check to the calls to Helpers.StringToField() in OpenSim.Region.ClientStack.LindenUDP.SendParcelInfo to avoid this issue. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 6e37e0c..2a0190b 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -6441,8 +6441,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP reply.AgentData.AgentID = m_agentId; reply.Data.ParcelID = parcelID; reply.Data.OwnerID = land.OwnerID; - reply.Data.Name = Helpers.StringToField(land.Name); - reply.Data.Desc = Helpers.StringToField(land.Description); + reply.Data.Name = Helpers.StringToField(land.Name != null ? land.Name : ""); + reply.Data.Desc = Helpers.StringToField(land.Description != null ? land.Description : ""); reply.Data.ActualArea = land.Area; reply.Data.BillableArea = land.Area; // TODO: what is this? @@ -6459,7 +6459,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP reply.Data.GlobalX = info.RegionLocX * Constants.RegionSize + x; reply.Data.GlobalY = info.RegionLocY * Constants.RegionSize + y; reply.Data.GlobalZ = pos.Z; - reply.Data.SimName = Helpers.StringToField(info.RegionName); + reply.Data.SimName = Helpers.StringToField(info.RegionName != null ? info.RegionName : ""); reply.Data.SnapshotID = land.SnapshotID; reply.Data.Dwell = 0; // TODO: not implemented yet reply.Data.SalePrice = land.SalePrice; -- cgit v1.1