bugfix: fix a first-frame crash in sliders

Doesn't affect Carousel, but user programs might run into it.
This commit is contained in:
Kartik K. Agaram 2023-12-19 10:43:04 -08:00
parent c4248a8e31
commit 4ddeb112aa
1 changed files with 1 additions and 0 deletions

View File

@ -1,4 +1,5 @@
update_sliders = function(State, x)
if State.slider_handlers == nil then return end -- very first frame
for name, slider in pairs(State.slider_handlers) do
if State.selected_slider == name then
slider.update(slider_value(slider, x))