From 72576cba9231e75b8dcc2b6fd792069213f8e088 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 10 Mar 2022 21:30:25 +0000 Subject: [PATCH] Fix logic around LV2 state save when no gui is available Signed-off-by: falkTX --- distrho/src/DistrhoPluginLV2.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/distrho/src/DistrhoPluginLV2.cpp b/distrho/src/DistrhoPluginLV2.cpp index 1ad0b16a..43ba64e9 100644 --- a/distrho/src/DistrhoPluginLV2.cpp +++ b/distrho/src/DistrhoPluginLV2.cpp @@ -938,8 +938,8 @@ public: #if ! DISTRHO_PLUGIN_HAS_UI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS // do not save UI-only messages if there is no UI available - if ((hints & kStateIsOnlyForUI) == 0x0) - continue; + if (hints & kStateIsOnlyForUI) + break; #endif if (hints & kStateIsHostReadable) @@ -966,6 +966,8 @@ public: value.length()+1, urid, LV2_STATE_IS_POD|LV2_STATE_IS_PORTABLE); + + break; } }