aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Fisher2004-11-10 10:50:47 +0000
committerJerome Fisher2004-11-10 10:50:47 +0000
commite4f600ee481d2b4bd0243c30984a4ea1a05c76ef (patch)
tree04a38a35f610bf44a09d760b28fc4993ac3506b1
parenteb9404beb89060a30a5f3aa5ce4b0db760a1284e (diff)
downloadscummvm-rg350-e4f600ee481d2b4bd0243c30984a4ea1a05c76ef.tar.gz
scummvm-rg350-e4f600ee481d2b4bd0243c30984a4ea1a05c76ef.tar.bz2
scummvm-rg350-e4f600ee481d2b4bd0243c30984a4ea1a05c76ef.zip
- Minor improvement to failure handling.
svn-id: r15777
-rw-r--r--backends/midi/windows.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp
index 932db0bcd0..b4c73e943a 100644
--- a/backends/midi/windows.cpp
+++ b/backends/midi/windows.cpp
@@ -56,6 +56,7 @@ int MidiDriver_WIN::open() {
MMRESULT res = midiOutOpen((HMIDIOUT *)&_mo, MIDI_MAPPER, (unsigned long) _streamEvent, 0, CALLBACK_EVENT);
if (res != MMSYSERR_NOERROR) {
check_error(res);
+ CloseHandle(_streamEvent);
return MERR_DEVICE_NOT_AVAILABLE;
}