mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
Fix a nullref issue in the AgentSetAppearance packet handler when removing the physactor from the scene
This commit is contained in:
@@ -1090,12 +1090,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
if (PhysicsActor != null)
|
||||
{
|
||||
m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients;
|
||||
m_physicsActor.OnOutOfBounds -= OutOfBoundsCall;
|
||||
m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
|
||||
m_physicsActor.UnSubscribeEvents();
|
||||
m_physicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate;
|
||||
PhysicsActor = null;
|
||||
try
|
||||
{
|
||||
m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients;
|
||||
m_physicsActor.OnOutOfBounds -= OutOfBoundsCall;
|
||||
m_physicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate;
|
||||
m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
|
||||
m_physicsActor.UnSubscribeEvents();
|
||||
PhysicsActor = null;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user