History

fix divide-by-zero asan warning in LODManager::autoAdjustLOD

Seth Alves committed 8 years ago

Commit 30c5fa61 parent 6ec91cf1 file · +1 −1Browse files

Showing the changes to interface/src/LODManager.cpp (1 of 1 file). Show all

Unified · Split

interface/src/LODManager.cpp+1−1
@@ -70,7 +70,7 @@ void LODManager::autoAdjustLOD(float realTimeDelta) { · 69 unmodified lines
70 // Note: we MUST clamp the blend to 1.0 for stability70 // Note: we MUST clamp the blend to 1.0 for stability
71 float blend = (realTimeDelta < LOD_ADJUST_RUNNING_AVG_TIMESCALE) ? realTimeDelta / LOD_ADJUST_RUNNING_AVG_TIMESCALE : 1.0f;71 float blend = (realTimeDelta < LOD_ADJUST_RUNNING_AVG_TIMESCALE) ? realTimeDelta / LOD_ADJUST_RUNNING_AVG_TIMESCALE : 1.0f;
72 _avgRenderTime = (1.0f - blend) * _avgRenderTime + blend * maxRenderTime; // msec72 _avgRenderTime = (1.0f - blend) * _avgRenderTime + blend * maxRenderTime; // msec
73 if (!_automaticLODAdjust) {73 if (!_automaticLODAdjust || _avgRenderTime == 0.0f) {
74 // early exit74 // early exit
75 return;75 return;
76 }76 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t