13
0

Fix loading VST2 presets at instantiation time

This fixes a crash when dragging a VST2 presets from
the mixer-sidebar to a track.
This commit is contained in:
Robin Gareus 2023-02-21 01:33:47 +01:00
parent 78c89fcbae
commit cd6c88c964
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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;