diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2019-09-06 11:47:28 +0300 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2019-09-06 11:47:28 +0300 |
commit | c72547adc31e0965f29ec1b520525705e32402f3 (patch) | |
tree | 61e61ef4ab50e6ca23db0f2c851f95ae54b6601a /indra | |
parent | 7411bff293f5f0240076bb5d5975ac4c50630aca (diff) |
SL-11883 FIXED Crash: SecondLifeViewer!update_statistics
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llviewerstats.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 15b2ac8acf..85d87a43af 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -359,16 +359,19 @@ void update_statistics() record(LLStatViewer::REBUILD_STACKTIME, last_frame_recording.getSum(*stat_type_t::getInstance("Sort Draw State"))); record(LLStatViewer::RENDER_STACKTIME, last_frame_recording.getSum(*stat_type_t::getInstance("Render Geometry"))); - LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(gAgent.getRegion()->getHost()); - if (cdp) + if (gAgent.getRegion() && isAgentAvatarValid()) { - sample(LLStatViewer::SIM_PING, F64Milliseconds (cdp->getPingDelay())); - gAvgSimPing = ((gAvgSimPing * gSimPingCount) + cdp->getPingDelay()) / (gSimPingCount + 1); - gSimPingCount++; - } - else - { - sample(LLStatViewer::SIM_PING, U32Seconds(10)); + LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(gAgent.getRegion()->getHost()); + if (cdp) + { + sample(LLStatViewer::SIM_PING, F64Milliseconds(cdp->getPingDelay())); + gAvgSimPing = ((gAvgSimPing * gSimPingCount) + cdp->getPingDelay()) / (gSimPingCount + 1); + gSimPingCount++; + } + else + { + sample(LLStatViewer::SIM_PING, U32Seconds(10)); + } } if (LLViewerStats::instance().getRecording().getSum(LLStatViewer::FPS)) |