aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorJamieson Christian2003-05-21 00:40:08 +0000
committerJamieson Christian2003-05-21 00:40:08 +0000
commit9780fc9c3e5b5866ed131f70ce4146207e910433 (patch)
tree46a3af44c037b749894ce16c878554a761e6859b /simon
parent34eee8b33bb1295f1872b8752d904df68133ad4c (diff)
downloadscummvm-rg350-9780fc9c3e5b5866ed131f70ce4146207e910433.tar.gz
scummvm-rg350-9780fc9c3e5b5866ed131f70ce4146207e910433.tar.bz2
scummvm-rg350-9780fc9c3e5b5866ed131f70ce4146207e910433.zip
Fixed thread problem that causes occassional crashes
svn-id: r7757
Diffstat (limited to 'simon')
-rw-r--r--simon/midi.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/simon/midi.cpp b/simon/midi.cpp
index 758b55346f..3b86103274 100644
--- a/simon/midi.cpp
+++ b/simon/midi.cpp
@@ -104,10 +104,9 @@ void MidiPlayer::metaEvent (byte type, byte *data, uint16 length) {
void MidiPlayer::onTimer (void *data) {
MidiPlayer *player = (MidiPlayer *) data;
- if (player->_paused || !player->_parser)
- return;
player->_system->lock_mutex (player->_mutex);
- player->_parser->onTimer();
+ if (!player->_paused && player->_parser)
+ player->_parser->onTimer();
player->_system->unlock_mutex (player->_mutex);
}