forked from mia/Aegisub
(Attempt to) fix crashes when scroll events hit the audio display and no audio is loaded.
Originally committed to SVN as r1522.
This commit is contained in:
parent
388429b899
commit
ed9dc1c28e
1 changed files with 1 additions and 0 deletions
|
@ -731,6 +731,7 @@ void AudioDisplay::SetPosition(int pos) {
|
|||
// Update position
|
||||
void AudioDisplay::UpdatePosition (int pos,bool IsSample) {
|
||||
// Safeguards
|
||||
if (!provider) return;
|
||||
if (IsSample) pos /= samples;
|
||||
int len = provider->GetNumSamples() / samples;
|
||||
if (pos < 0) pos = 0;
|
||||
|
|
Loading…
Reference in a new issue