Fix potential crash clicking AudioKaraoke

Originally committed to SVN as r818.
This commit is contained in:
Dan Donovan 2007-01-17 05:22:21 +00:00
parent ee3238a657
commit 2b27078cf4
1 changed files with 3 additions and 2 deletions

View File

@ -443,12 +443,13 @@ void AudioKaraoke::OnMouse(wxMouseEvent &event) {
Refresh(false); Refresh(false);
} }
// Released left button // Released left button
else if (event.LeftUp()) { else if (event.LeftUp() && HasCapture()) {
ReleaseMouse(); ReleaseMouse();
} }
// Released right button; make a menu for selecting \k type // Released right button; make a menu for selecting \k type
else if (event.RightUp()) { else if (event.RightUp()) {
ReleaseMouse(); if (HasCapture())
ReleaseMouse();
AudioKaraokeTagMenu menu(this); AudioKaraokeTagMenu menu(this);
PopupMenu(&menu); PopupMenu(&menu);