Fix potential NPE in ExoPlayerImplInternal

I'll have a more thorough refactor of some of this class
fairly soon!

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139451693
This commit is contained in:
olly 2016-11-17 06:02:39 -08:00 committed by Oliver Woodman
parent 61c9c16954
commit f57434006f

View File

@ -918,7 +918,7 @@ import java.io.IOException;
Object uid = loadingPeriodHolder.uid;
int index = timeline.getIndexOfPeriod(uid);
if (index == C.INDEX_UNSET) {
boolean restarted = attemptRestart(playingPeriodHolder.index, oldTimeline, timeline);
boolean restarted = attemptRestart(loadingPeriodHolder.index, oldTimeline, timeline);
finishSourceInfoRefresh(manifest, true);
if (!restarted) {
// TODO: We should probably propagate an error here.