Skip to content

Commit

Permalink
[fix] crash when having 0 step
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrabit committed Nov 24, 2022
1 parent 931a083 commit 835eb03
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vstgui/standalone/examples/mandelbrot/source/modelbinding.h
Expand Up @@ -62,6 +62,8 @@ struct ModelBinding : VSTGUI::Standalone::UIDesc::IModelBinding,
if (&value == maxIterations.get ())
{
auto step = Value::currentStepValue (*maxIterations.get ());
if (step < 1)
step = 1;
if (step != IStepValue::InvalidStep)
model->setIterations (step);
return;
Expand Down

0 comments on commit 835eb03

Please sign in to comment.