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