From 835eb03a635e70249252768d387eaf4b62d61b82 Mon Sep 17 00:00:00 2001 From: Yvan Grabit Date: Thu, 24 Nov 2022 15:27:43 +0100 Subject: [PATCH] [fix] crash when having 0 step --- vstgui/standalone/examples/mandelbrot/source/modelbinding.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vstgui/standalone/examples/mandelbrot/source/modelbinding.h b/vstgui/standalone/examples/mandelbrot/source/modelbinding.h index d8ab59119..b50cd6f46 100644 --- a/vstgui/standalone/examples/mandelbrot/source/modelbinding.h +++ b/vstgui/standalone/examples/mandelbrot/source/modelbinding.h @@ -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;