Skip to content

Commit

Permalink
Fix potential NPE if source is released without being prepared
Browse files Browse the repository at this point in the history
Issue: #2264

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143550088
  • Loading branch information
ojw28 committed Jan 4, 2017
1 parent 2512bd6 commit ae30fe4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ public void releasePeriod(MediaPeriod mediaPeriod) {

@Override
public void releaseSource() {
playlistTracker.release();
playlistTracker = null;
if (playlistTracker != null) {
playlistTracker.release();
playlistTracker = null;
}
sourceListener = null;
}

Expand Down

0 comments on commit ae30fe4

Please sign in to comment.