remove some potencial null refs i did add in last days :(

melanie
UbitUmarov 2016-11-19 21:06:42 +00:00
parent 28f7d429fc
commit 8010413e64
2 changed files with 6 additions and 5 deletions

View File

@ -620,7 +620,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_entityProps = null;
m_killRecord.Clear();
GroupsInView.Clear();
m_scene = null;
// m_scene = null; can't do this unless checks are added everywhere due to workitems already in pools
//m_log.InfoFormat("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false));
//GC.Collect();
//m_log.InfoFormat("[CLIENTVIEW] Memory post GC {0}", System.GC.GetTotalMemory(true));
@ -4371,7 +4372,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
ushort timeDilation;
if(m_scene == null)
if(!IsActive)
return;
timeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f);
@ -12945,6 +12946,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// provide your own method.</param>
protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting, UnackedPacketMethod method)
{
if(!IsActive)
return;
if (m_outPacketsToDrop != null)
if (m_outPacketsToDrop.Contains(packet.Type.ToString()))
return;

View File

@ -299,10 +299,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OnQueueEmpty = null;
PendingAcks.Clear();
NeedAcks.Clear();
NeedAcks = null;
PendingAcks = null;
m_nextPackets = null;
m_packetOutboxes = null;
}
/// <summary>