MidiPlayer: Fix crash when dropping a midi file
Window must be locked or MidiRunThread crashes with a segment violation. Change-Id: I9d5d0fa477475a9b5ba877aea3d6583690aacb2b Reviewed-on: https://review.haiku-os.org/c/1080 Reviewed-by: Barrett17 <[email protected]>
This commit is contained in:
@@ -427,7 +427,7 @@ MidiPlayerWindow::_StopHook(int32 arg)
|
||||
void
|
||||
MidiPlayerWindow::StopHook()
|
||||
{
|
||||
Lock();
|
||||
if (Lock()) {
|
||||
// we may be called from the synth's thread
|
||||
|
||||
fIsPlaying = false;
|
||||
@@ -439,6 +439,7 @@ MidiPlayerWindow::StopHook()
|
||||
|
||||
Unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user