Fix crash on out of range MIDI events (though this shouldn't be possible at all....
[ardour.git] / libs / ardour / midi_port.cc
index 7a045dc8290d23949e103a598697005b93c7d2bc..fc48218efad747c4ad073f0202373c7d923201c5 100644 (file)
@@ -37,12 +37,13 @@ MidiPort::MidiPort (const std::string& name, Flags flags, bool external, nframes
                /* external ports use the same buffer for the jack port (_ext_port)
                 * and internal ports (this) */
                _ext_port = new JackMidiPort (name, flags, _buffer);
+               Port::set_name (_ext_port->name());
        } else {
                /* internal ports just have a single buffer, no jack port */
                _ext_port = 0;
+               set_name (name);
        }
 
-       set_name (name);
        reset ();
 }