mirror of https://github.com/odrling/Aegisub
Fix #885, for some reason mouse events were firing in the audio display while some internal variables were invalid. Now mouse events are skipped if the display is missing a player or provider.
Originally committed to SVN as r3068.
This commit is contained in:
parent
8e13869510
commit
b90baf0ef4
|
@ -1372,6 +1372,11 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!player || !provider) {
|
||||
event.Skip();
|
||||
return;
|
||||
}
|
||||
|
||||
// Is inside?
|
||||
bool inside = false;
|
||||
bool onScale = false;
|
||||
|
@ -1434,7 +1439,7 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event) {
|
|||
}
|
||||
|
||||
// Cursor drawing
|
||||
if (!player->IsPlaying() && origImage) {
|
||||
if (player && !player->IsPlaying() && origImage) {
|
||||
// Draw bg
|
||||
wxClientDC dc(this);
|
||||
dc.DrawBitmap(*origImage,0,0);
|
||||
|
|
Loading…
Reference in New Issue