From 5b7a585b4f01c18bcee4245a58ac41c3b51f01f5 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 27 Nov 2015 08:22:30 -0800 Subject: Sometimes the viewer sends a null string as mapName; this made the client thread throw an exception with unexpected behavior for users (nothing happens). This commit gives it a sane default: it assumes we're looking for a position in the current region. --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 62206e9..5374fa5 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -9104,8 +9104,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP return true; } #endregion - string mapName = Util.UTF8.GetString(map.NameData.Name, 0, - map.NameData.Name.Length - 1); + string mapName = (map.NameData.Name.Length == 0) ? m_scene.RegionInfo.RegionName : + Util.UTF8.GetString(map.NameData.Name, 0, map.NameData.Name.Length - 1); RequestMapName handlerMapNameRequest = OnMapNameRequest; if (handlerMapNameRequest != null) { -- cgit v1.1