summaryrefslogtreecommitdiff
path: root/indra/newview/llfasttimerview.cpp
diff options
context:
space:
mode:
authorYuri Chebotarev <ychebotarev@productengine.com>2010-01-05 14:31:09 +0200
committerYuri Chebotarev <ychebotarev@productengine.com>2010-01-05 14:31:09 +0200
commit47dc1fc3437c9c266204604e85d8489b6e580584 (patch)
treedf6b5e926ecda5205a5e6151e8149d261de1a744 /indra/newview/llfasttimerview.cpp
parenteb880b2a559fe1103bef47fa3f6c7611a6c3cfbb (diff)
parent5043fcce370fd21e9709f94787191a060919cc2b (diff)
merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llfasttimerview.cpp')
-rw-r--r--indra/newview/llfasttimerview.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index effa57b1ef..7d8bb6e104 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -323,7 +323,9 @@ void LLFastTimerView::draw()
S32 xleft = margin;
S32 ytop = margin;
- mAverageCyclesPerTimer = llround(lerp((F32)mAverageCyclesPerTimer, (F32)(LLFastTimer::sTimerCycles / (U64)LLFastTimer::sTimerCalls), 0.1f));
+ mAverageCyclesPerTimer = LLFastTimer::sTimerCalls == 0
+ ? 0
+ : llround(lerp((F32)mAverageCyclesPerTimer, (F32)(LLFastTimer::sTimerCycles / (U64)LLFastTimer::sTimerCalls), 0.1f));
LLFastTimer::sTimerCycles = 0;
LLFastTimer::sTimerCalls = 0;