mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-21 21:15:45 -05:00
Fix #2377: add null check for mAudioOutput in processAudioSegments to prevent NPE when no audio outputs present (#2378)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -188,6 +188,8 @@ public class AudioPlaybackManager implements Listener<AudioSegment>, IAudioContr
|
||||
audioSegment.decrementConsumerCount();
|
||||
}
|
||||
else if(audioSegment.isLinked())
|
||||
{
|
||||
if(mAudioOutput != null)
|
||||
{
|
||||
mAudioChannelsLock.lock();
|
||||
|
||||
@@ -208,9 +210,10 @@ public class AudioPlaybackManager implements Listener<AudioSegment>, IAudioContr
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Sort audio segments by playback priority and assign to empty audio outputs
|
||||
if(!mAudioSegments.isEmpty())
|
||||
if(!mAudioSegments.isEmpty() && mAudioOutput != null)
|
||||
{
|
||||
mAudioSegments.sort(mAudioSegmentPrioritySorter);
|
||||
mAudioChannelsLock.lock();
|
||||
|
||||
Reference in New Issue
Block a user