Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e8490c0 authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "AudioFlinger: Do not dereference null track"

parents d9a8e6d7 9db3bb48
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -746,7 +746,7 @@ sp<IAudioTrack> AudioFlinger::createTrack(const CreateTrackInput& input,
        output.afFrameCount = thread->frameCount();
        output.afSampleRate = thread->sampleRate();
        output.afLatencyMs = thread->latency();
        output.trackId = track->id();
        output.trackId = track == nullptr ? -1 : track->id();

        // move effect chain to this output thread if an effect on same session was waiting
        // for a track to be created