mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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);
|
Assertions.checkState(opened);
|
||||||
opened = false;
|
opened = false;
|
||||||
uri = null;
|
uri = null;
|
||||||
if (currentSegmentIndex < fakeData.segments.size()) {
|
if (fakeData != null && currentSegmentIndex < fakeData.segments.size()) {
|
||||||
Segment current = fakeData.segments.get(currentSegmentIndex);
|
Segment current = fakeData.segments.get(currentSegmentIndex);
|
||||||
if (current.isErrorSegment() && current.exceptionThrown) {
|
if (current.isErrorSegment() && current.exceptionThrown) {
|
||||||
current.exceptionCleared = true;
|
current.exceptionCleared = true;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue