Browse Source

Fix crash in the absence of MIDI ports

Check that some MIDI ports were found, and exit cleanly when there
was none.
develop
Damien Goutte-Gattat 5 years ago
parent
commit
3df06891e6
  1. 3
      src/kmxtool.c

3
src/kmxtool.c

@ -287,6 +287,9 @@ main(int argc, char **argv)
ports = midi_get_ports();
if ( ! ports )
errx(EXIT_FAILURE, "no MIDI ports available");
for ( p = ports, found = 0; *p != NULL; p++ ) {
if ( ! found )
found = find_microx_on_port(*p, &version, 1) != -1;

Loading…
Cancel
Save