#782 Resolves NPE error in AudioOutput (#785)

Co-authored-by: Denny <denny@denny-desktop>
This commit is contained in:
Denny Sheirer
2020-05-03 09:30:29 +00:00
committed by GitHub
parent 1aa22789e5
commit c8b441dbd4

View File

@@ -488,7 +488,7 @@ public abstract class AudioOutput implements LineListener, Listener<IdentifierUp
//Process any new buffers that have been added to the audio segment. If a next audio segment gets assigned
//while processing, exit the loop so that we can evaluate the next for higher priority preempt. If the next
//segment is a linked segment, ignore it so that we can close out the current segment.
while((mNextAudioSegment == null || mNextAudioSegment.isLinked()) &&
while(mCurrentAudioSegment != null && (mNextAudioSegment == null || mNextAudioSegment.isLinked()) &&
mCurrentBufferIndex < mCurrentAudioSegment.getAudioBufferCount() &&
!mCurrentAudioSegment.isDoNotMonitor())
{