* Guard against a null point passed to RemoveClientCircuit (odd that this happens at all)

* Patch from Kurt Taylor (IBM) in http://opensimulator.org/mantis/view.php?id=1720
* Thanks Kurt!
0.6.0-stable
Justin Clarke Casey 2008-07-11 17:58:26 +00:00
parent 53461fad2c
commit da68f18a6b
1 changed files with 15 additions and 4 deletions

View File

@ -474,15 +474,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public virtual void RemoveClientCircuit(uint circuitcode)
{
EndPoint sendto = null;
if (clientCircuits_reverse.Contains(circuitcode)) {
if (clientCircuits_reverse.Contains(circuitcode))
{
sendto = (EndPoint)clientCircuits_reverse[circuitcode];
clientCircuits_reverse.Remove(circuitcode);
lock (clientCircuits) {
lock (clientCircuits)
{
if (sendto != null)
{
clientCircuits.Remove(sendto);
}
lock (proxyCircuits) {
else
{
m_log.DebugFormat(
"[UDPSERVER]: endpoint for circuit code {0} in RemoveClientCircuit() was unexpectedly null!", circuitcode);
}
}
lock (proxyCircuits)
{
proxyCircuits.Remove(circuitcode);
}
}