Fails mapper opening when no midi out devices are present.
This commit is contained in:
parent
3c39af2e75
commit
05b85c3290
|
@ -117,7 +117,10 @@ static BOOL MIDIMAP_LoadSettingsDefault(MIDIMAPDATA* mom, const char* port)
|
|||
ERR("Registry glitch: couldn't find midi out (%s)\n", port);
|
||||
dev = 0;
|
||||
}
|
||||
|
||||
|
||||
/* this is necessary when no midi out ports are present */
|
||||
if (dev >= numMidiOutPorts)
|
||||
return FALSE;
|
||||
/* sets default */
|
||||
for (i = 0; i < 16; i++) mom->ChannelMap[i] = &midiOutPorts[dev];
|
||||
|
||||
|
@ -220,7 +223,7 @@ static BOOL MIDIMAP_LoadSettings(MIDIMAPDATA* mom)
|
|||
}
|
||||
RegCloseKey(hKey);
|
||||
|
||||
if (TRACE_ON(msacm))
|
||||
if (ret && TRACE_ON(msacm))
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
|
|
Loading…
Reference in New Issue