mirror of
https://github.com/samsonjs/media.git
synced 2026-04-05 11:15:46 +00:00
Fix NPE in FakeDataSource.close()
If open() fails because of the file isn't available then fakeData is null. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=160249214
This commit is contained in:
parent
410228acb8
commit
444dbeb4c4
1 changed files with 1 additions and 1 deletions
|
|
@ -199,7 +199,7 @@ public final class FakeDataSource implements DataSource {
|
|||
Assertions.checkState(opened);
|
||||
opened = false;
|
||||
uri = null;
|
||||
if (currentSegmentIndex < fakeData.segments.size()) {
|
||||
if (fakeData != null && currentSegmentIndex < fakeData.segments.size()) {
|
||||
Segment current = fakeData.segments.get(currentSegmentIndex);
|
||||
if (current.isErrorSegment() && current.exceptionThrown) {
|
||||
current.exceptionCleared = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue