From d2e766bf834ac161eb86c2d25fe8a598e166a2a1 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 8 Jan 2016 04:28:36 +0000 Subject: [PATCH] Fix crash when loading with lv2 non-synths with midi ports (typo!) Closes #237 --- source/backend/plugin/CarlaPluginLV2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/backend/plugin/CarlaPluginLV2.cpp b/source/backend/plugin/CarlaPluginLV2.cpp index 81c78c004..bf2361614 100644 --- a/source/backend/plugin/CarlaPluginLV2.cpp +++ b/source/backend/plugin/CarlaPluginLV2.cpp @@ -2745,13 +2745,13 @@ public: midiData[1] = k; if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_ATOM) - lv2_atom_buffer_write(&evInAtomIters[k], 0, 0, CARLA_URI_MAP_ID_MIDI_EVENT, 3, midiData); + lv2_atom_buffer_write(&evInAtomIters[j], 0, 0, CARLA_URI_MAP_ID_MIDI_EVENT, 3, midiData); else if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_EVENT) - lv2_event_write(&evInEventIters[k], 0, 0, CARLA_URI_MAP_ID_MIDI_EVENT, 3, midiData); + lv2_event_write(&evInEventIters[j], 0, 0, CARLA_URI_MAP_ID_MIDI_EVENT, 3, midiData); else if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_MIDI_LL) - lv2midi_put_event(&evInMidiStates[k], 0.0, 3, midiData); + lv2midi_put_event(&evInMidiStates[j], 0.0, 3, midiData); } } }