From 9759b715d04b41144250f46aade74437f5bc01c0 Mon Sep 17 00:00:00 2001 From: Paolo Marrone Date: Mon, 30 Jun 2025 16:03:38 +0200 Subject: [PATCH] vst3: connectionpoint on ui gets called before view attachment - handled --- templates/vst3/src/vst3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/vst3/src/vst3.c b/templates/vst3/src/vst3.c index 75ca9a0..c490d26 100644 --- a/templates/vst3/src/vst3.c +++ b/templates/vst3/src/vst3.c @@ -2590,6 +2590,7 @@ static Steinberg_tresult controllerIConnectionPointDisconnect(void* thisInterfac return Steinberg_kResultFalse; } +// This can get called after plugView creation but before attachment, so that ui is not ready static Steinberg_tresult controllerIConnectionPointNotify(void* thisInterface, struct Steinberg_Vst_IMessage* message) { controller *c = (controller *)((char *)thisInterface - offsetof(controller, vtblIConnectionPoint)); @@ -2609,9 +2610,9 @@ static Steinberg_tresult controllerIConnectionPointNotify(void* thisInterface, s return Steinberg_kResultFalse; for (size_t i = 0; i < c->viewsCount; i++) { - if (!c->views[i]) - continue; plugView *v = c->views[i]; + if (!v || !v->ui) + continue; plugin_ui_receive_from_dsp(v->ui, data, size); break; // Assuming there is only 1 view }