diff options
author | Matthew Hoops | 2011-05-18 18:23:37 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-05-18 18:23:37 -0400 |
commit | d4c92983920cfe3b25a22d91e12c750e591b917e (patch) | |
tree | c0b63318b9ba0e67528337cfaa21515def1c3962 /backends/midi/camd.cpp | |
parent | 7e2edf16b3e2bf1d2b31999979a60802514df6cb (diff) | |
parent | cf107e24be28c7e6db65b5c7ffed120af4a7994b (diff) | |
download | scummvm-rg350-d4c92983920cfe3b25a22d91e12c750e591b917e.tar.gz scummvm-rg350-d4c92983920cfe3b25a22d91e12c750e591b917e.tar.bz2 scummvm-rg350-d4c92983920cfe3b25a22d91e12c750e591b917e.zip |
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'backends/midi/camd.cpp')
-rw-r--r-- | backends/midi/camd.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/backends/midi/camd.cpp b/backends/midi/camd.cpp index cc791cf7c0..88973488ca 100644 --- a/backends/midi/camd.cpp +++ b/backends/midi/camd.cpp @@ -17,9 +17,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ */ // Disable symbol overrides so that we can use system headers. @@ -116,11 +113,21 @@ void MidiDriver_CAMD::close() { } void MidiDriver_CAMD::send(uint32 b) { + if (!_isOpen) { + warning("MidiDriver_CAMD: Got event while not open"); + return; + } + ULONG data = READ_LE_UINT32(&b); _ICamd->PutMidi(_midi_link, data); } void MidiDriver_CAMD::sysEx(const byte *msg, uint16 length) { + if (!_isOpen) { + warning("MidiDriver_CAMD: Got SysEx while not open"); + return; + } + unsigned char buf[266]; assert(length + 2 <= ARRAYSIZE(buf)); |