Skip to content

Commit

Permalink
getPortList returns an empty set if the requirements cannot be met.
Browse files Browse the repository at this point in the history
It's up to the developers to deal with this case, anyway.
  • Loading branch information
Tobias Schlemmer committed Jun 8, 2014
1 parent 356d619 commit 8f24b42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RtMidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4338,7 +4338,7 @@ namespace rtmidi{
PortList MidiInWinMM :: getPortList(int capabilities)
{
WinMidiData *data = static_cast<WinMidiData *> (apiData_);
if (!data) return PortList();
if (!data || capabilities != PortDescriptor::INPUT) return PortList();
return WinMMPortDescriptor::getPortList(PortDescriptor::INPUT,data->getClientName());
}

Expand Down Expand Up @@ -4587,7 +4587,7 @@ namespace rtmidi{
PortList MidiOutWinMM :: getPortList(int capabilities)
{
WinMidiData *data = static_cast<WinMidiData *> (apiData_);
if (!data) return PortList();
if (!data || capabilities != PortDescriptor::OUTPUT) return PortList();
return WinMMPortDescriptor::getPortList(PortDescriptor::OUTPUT,data->getClientName());
}

Expand Down

0 comments on commit 8f24b42

Please sign in to comment.