Fix a nullref issue in the AgentSetAppearance packet handler when removing the physactor from the scene
parent
48c52d6e48
commit
1582e05ac7
|
@ -1090,12 +1090,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
if (PhysicsActor != null)
|
if (PhysicsActor != null)
|
||||||
{
|
{
|
||||||
m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients;
|
try
|
||||||
m_physicsActor.OnOutOfBounds -= OutOfBoundsCall;
|
{
|
||||||
m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
|
m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients;
|
||||||
m_physicsActor.UnSubscribeEvents();
|
m_physicsActor.OnOutOfBounds -= OutOfBoundsCall;
|
||||||
m_physicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate;
|
m_physicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate;
|
||||||
PhysicsActor = null;
|
m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
|
||||||
|
m_physicsActor.UnSubscribeEvents();
|
||||||
|
PhysicsActor = null;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue