From cd6c88c96479c09b9c490482ae619d38a948a4f3 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 21 Feb 2023 01:33:47 +0100 Subject: [PATCH] Fix loading VST2 presets at instantiation time This fixes a crash when dragging a VST2 presets from the mixer-sidebar to a track. --- libs/ardour/vst_plugin.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc index 3228761cc3..4f28b6f814 100644 --- a/libs/ardour/vst_plugin.cc +++ b/libs/ardour/vst_plugin.cc @@ -513,7 +513,7 @@ VSTPlugin::load_user_preset (PresetRecord r) _state->wanted_chunk = raw_data; _state->wanted_chunk_size = size; _state->want_chunk = 1; - if (!has_editor () || 0 == plugin_insert ()->window_proxy ()) { + if (!has_editor () || (plugin_insert () && 0 == plugin_insert ()->window_proxy ())) { vststate_maybe_set_program (_state); _state->want_chunk = 0; _state->want_program = -1;