Prevent a nullref if SimStatsReporter tries to report on a sim where psysics are

not yet initialized
avinationmerge
Melanie 2012-09-03 13:25:31 +02:00
parent 63e6666f22
commit 7cfcca87c6
1 changed files with 17 additions and 14 deletions

View File

@ -438,6 +438,8 @@ namespace OpenSim.Region.Framework.Scenes
} }
// Extra statistics that aren't currently sent to clients // Extra statistics that aren't currently sent to clients
if (m_scene.PhysicsScene != null)
{
lock (m_lastReportedExtraSimStats) lock (m_lastReportedExtraSimStats)
{ {
m_lastReportedExtraSimStats[LastReportedObjectUpdateStatName] = m_objectUpdates / m_statsUpdateFactor; m_lastReportedExtraSimStats[LastReportedObjectUpdateStatName] = m_objectUpdates / m_statsUpdateFactor;
@ -458,6 +460,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
} }
}
// LastReportedObjectUpdates = m_objectUpdates / m_statsUpdateFactor; // LastReportedObjectUpdates = m_objectUpdates / m_statsUpdateFactor;
ResetValues(); ResetValues();