summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/JackMidiDriver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine/JackMidiDriver.cpp')
-rw-r--r--src/libs/engine/JackMidiDriver.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libs/engine/JackMidiDriver.cpp b/src/libs/engine/JackMidiDriver.cpp
index 22db1d4b..7aba309a 100644
--- a/src/libs/engine/JackMidiDriver.cpp
+++ b/src/libs/engine/JackMidiDriver.cpp
@@ -22,6 +22,7 @@
#include <raul/midi_events.h>
#include "types.hpp"
#include "JackMidiDriver.hpp"
+#include "JackAudioDriver.hpp"
#include "ThreadManager.hpp"
#include "AudioDriver.hpp"
#include "EventBuffer.hpp"
@@ -50,6 +51,11 @@ JackMidiPort::JackMidiPort(JackMidiDriver* driver, DuplexPort* patch_port)
patch_port->path().c_str(), JACK_DEFAULT_MIDI_TYPE,
(patch_port->is_input()) ? JackPortIsInput : JackPortIsOutput,
0);
+
+ if (_jack_port == NULL) {
+ cerr << "[JackMidiPort] ERROR: Failed to register port " << patch_port->path() << endl;
+ throw JackAudioDriver::PortRegistrationFailedException();
+ }
patch_port->buffer(0)->clear();
}