Commit 05b85c32 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Fails mapper opening when no midi out devices are present.

parent 3c39af2e
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment