diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-02-05 18:30:40 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-02-05 18:30:40 +0200 |
| commit | ad63fa5ffad787402fc5b414fd8f2b85f9300411 (patch) | |
| tree | bf6b24238b8f4f40ee3ea584a642e75cff6fca63 /indra/newview/llviewerstats.cpp | |
| parent | 2c7a8a2485b98ff56e6fdc431bba5ccd226ae740 (diff) | |
| parent | 2998552f3d7447da316afdd1713595528596a0c5 (diff) | |
Merge branch 'master' into DRTVWR-460
Diffstat (limited to 'indra/newview/llviewerstats.cpp')
| -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)) |
