From 26835a27c446bfe4ecd78be8f86f1ed9486563ba Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 20 Oct 2017 23:13:14 +0200 Subject: [PATCH] FIX #280 --- src/core/MidiIO.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/MidiIO.cpp b/src/core/MidiIO.cpp index 3d7eb727..346b93e0 100644 --- a/src/core/MidiIO.cpp +++ b/src/core/MidiIO.cpp @@ -63,12 +63,12 @@ std::vector MidiIO::getDevices() { void MidiIO::openDevice(std::string deviceName) { - MidiInWrapper *mw = midiInMap[deviceName]; - if (this->id > 0 || this->deviceName != "") { close(); } + MidiInWrapper *mw = midiInMap[deviceName]; + if (!mw) { try { mw = new MidiInWrapper();