diff options
Diffstat (limited to 'indra/llcommon/lltrace.h')
-rw-r--r-- | indra/llcommon/lltrace.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index 6dfe9e4b4e..0daac95ea4 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -504,9 +504,11 @@ public: LLUnitImplicit<LLUnits::Seconds, F64> time_stamp = LLTimer::getTotalSeconds(); LLUnitImplicit<LLUnits::Seconds, F64> delta_time = time_stamp - mLastSampleTimeStamp; - mSum += (F64)mLastValue * delta_time; - - mTotalSamplingTime += delta_time; + if (mHasValue) + { + mSum += (F64)mLastValue * delta_time; + mTotalSamplingTime += delta_time; + } mLastSampleTimeStamp = time_stamp; } |