Just because there is an agent update handler, that doesn't mean there is

a pre agent update handler. Null check these separately.
soprefactor
Melanie Thielker 2010-05-26 19:26:30 +02:00 committed by Melanie
parent a69c1c7898
commit 9ac8d2de79
1 changed files with 4 additions and 3 deletions

View File

@ -4918,14 +4918,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
arg.SessionID = x.SessionID;
arg.State = x.State;
UpdateAgent handlerAgentUpdate = OnAgentUpdate;
UpdateAgent handlerPreAgentUpdate = OnPreAgentUpdate;
lastarg = arg; // save this set of arguments for nexttime
if (handlerAgentUpdate != null)
{
if (handlerPreAgentUpdate != null)
OnPreAgentUpdate(this, arg);
if (handlerAgentUpdate != null)
OnAgentUpdate(this, arg);
}
handlerAgentUpdate = null;
handlerPreAgentUpdate = null;
}
}