mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AudioTransportSource: Avoid nullptr dereference in hasStreamFinished()
This commit is contained in:
parent
2583b06481
commit
dfe4858e55
1 changed files with 3 additions and 2 deletions
|
|
@ -168,8 +168,9 @@ double AudioTransportSource::getLengthInSeconds() const
|
|||
|
||||
bool AudioTransportSource::hasStreamFinished() const noexcept
|
||||
{
|
||||
return positionableSource->getNextReadPosition() > positionableSource->getTotalLength() + 1
|
||||
&& ! positionableSource->isLooping();
|
||||
return positionableSource == nullptr
|
||||
|| (positionableSource->getNextReadPosition() > positionableSource->getTotalLength() + 1
|
||||
&& ! positionableSource->isLooping());
|
||||
}
|
||||
|
||||
void AudioTransportSource::setNextReadPosition (int64 newPosition)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue