From dd962bd0c4b1fd48b570ea92a2663f5843f4d1d5 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Fri, 10 May 2024 19:21:50 -0400 Subject: [PATCH] Guard against null and inactive in UI Lag instant snap --- include/sst/basic-blocks/dsp/Lag.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/sst/basic-blocks/dsp/Lag.h b/include/sst/basic-blocks/dsp/Lag.h index b6ead23..5ced4c5 100644 --- a/include/sst/basic-blocks/dsp/Lag.h +++ b/include/sst/basic-blocks/dsp/Lag.h @@ -147,7 +147,10 @@ struct UIComponentLagHandler void instantlySnap() { - *destination = targetValue; + if (destination) + { + *destination = targetValue; + } active = false; } };