mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-20 20:45:47 -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();
|
audioSegment.decrementConsumerCount();
|
||||||
}
|
}
|
||||||
else if(audioSegment.isLinked())
|
else if(audioSegment.isLinked())
|
||||||
|
{
|
||||||
|
if(mAudioOutput != null)
|
||||||
{
|
{
|
||||||
mAudioChannelsLock.lock();
|
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
|
//Sort audio segments by playback priority and assign to empty audio outputs
|
||||||
if(!mAudioSegments.isEmpty())
|
if(!mAudioSegments.isEmpty() && mAudioOutput != null)
|
||||||
{
|
{
|
||||||
mAudioSegments.sort(mAudioSegmentPrioritySorter);
|
mAudioSegments.sort(mAudioSegmentPrioritySorter);
|
||||||
mAudioChannelsLock.lock();
|
mAudioChannelsLock.lock();
|
||||||
|
|||||||
Reference in New Issue
Block a user