From cbb0d27f684b4e0f3c091c6a9268c1e2309426f7 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Tue, 10 Oct 2017 16:20:52 -0700 Subject: [PATCH] div by zero fix --- interface/src/LODManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/LODManager.cpp b/interface/src/LODManager.cpp index 199f3ea2c6..4bdb13545e 100644 --- a/interface/src/LODManager.cpp +++ b/interface/src/LODManager.cpp @@ -55,7 +55,7 @@ void LODManager::autoAdjustLOD(float batchTime, float engineRunTime, float delta float maxTime = glm::max(renderTime, engineRunTime); const float BLEND_TIMESCALE = 0.3f; // sec const float safeDeltaTime = (deltaTime == 0.0f) ? 0.001f : deltaTime; - float blend = BLEND_TIMESCALE / deltaTimeSec; + float blend = BLEND_TIMESCALE / safeDeltaTime; if (blend > 1.0f) { blend = 1.0f; }