forked from mia/Aegisub
Fix crash when playback cursor leaves the visible part of the audio display on wxMac.
Originally committed to SVN as r1572.
This commit is contained in:
parent
6b4ec2dcc5
commit
6587f4882a
1 changed files with 13 additions and 11 deletions
|
@ -1956,6 +1956,7 @@ void AudioDisplay::OnUpdateTimer(wxTimerEvent &event) {
|
|||
// Draw cursor
|
||||
wxMemoryDC src;
|
||||
curpos = GetXAtSample(curPos);
|
||||
if (curpos >= 0 && curpos < GetClientSize().GetWidth()) {
|
||||
dc.SetPen(wxPen(Options.AsColour(_T("Audio Play cursor"))));
|
||||
src.SelectObject(*origImage);
|
||||
if (fullDraw) {
|
||||
|
@ -1969,6 +1970,7 @@ void AudioDisplay::OnUpdateTimer(wxTimerEvent &event) {
|
|||
dc.DrawLine(curpos,0,curpos,h);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (curPos > player->GetEndPosition() + 8192) {
|
||||
player->Stop();
|
||||
|
|
Loading…
Reference in a new issue