From 6b5ed3e591ef50ecfcf715e1fc430c8b6ed5582d Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 4 Apr 2021 14:27:42 +0200 Subject: [PATCH] rogueviz::smoothcam:: do not crash if total_total == 0 --- rogueviz/smoothcam.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rogueviz/smoothcam.cpp b/rogueviz/smoothcam.cpp index 548c95d3..77dd0501 100644 --- a/rogueviz/smoothcam.cpp +++ b/rogueviz/smoothcam.cpp @@ -231,6 +231,8 @@ void handle_animation() { totals.push_back(total); total_total += total; } + + if(total_total == 0) return; ld t = ticks / anims::period; t = frac(t);